|
158 | 158 | "tags": []
|
159 | 159 | },
|
160 | 160 | "source": [
|
161 |
| - "The table belo\n", |
| 161 | + "The table below shows a mapping between previous WebMap class properties and methods and corresponding functionality in the new 2.4 release:\n", |
162 | 162 | "\n",
|
163 | 163 | "Methods:\n",
|
164 | 164 | "\n",
|
|
168 | 168 | "|wm.add_table()]()|m.content.add()|new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n",
|
169 | 169 | "|wm.basemap_title()|m.basemap.title|new [_BasemapManager_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.BasemapManager) class property\n",
|
170 | 170 | "|wm.configure_pop_ups()|m.content.popup(index_position)|new [_PopupManager_](/python/api-reference/arcgis.map.toc.html#arcgis.map.popups.PopupManager) class\n",
|
171 |
| - "|wm.get_layer()|m.content.layers[index_position]|layer|new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n", |
172 |
| - "|wm.get_table()|m.content.tables[index_position]|table|new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n", |
| 171 | + "|wm.get_layer()|m.content.layers[index_position]||new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n", |
| 172 | + "|wm.get_table()|m.content.tables[index_position]||new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n", |
173 | 173 | "|wm.move_from_basemap()|m.basemap.move_from_basemap()|new [_BasemapManager_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.BasemapManager) class method\n",
|
174 | 174 | "|wm.move_to_basemap()]|m.content.move_to_basemap(layer_index)|new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n",
|
175 | 175 | "|wm.print()|m.print()|\n",
|
|
232 | 232 | "tags": []
|
233 | 233 | },
|
234 | 234 | "source": [
|
235 |
| - "The previous `arcgis.widges` module contained the map the [MapView](https://developers.arcgis.com/python/api-reference/arcgis.widgets.html#mapview) class which served as the map widget in Jupyter notebooks. The Python API 2.4 release refactors the _MapView_ functionality into two new classes in the [`arcgis.map`](/python/api-reference/arcgis.map.toc.html) module: [_Map_](/python/api-reference/arcgis.map.toc.html#map) and [_Scene_](/api-reference/arcgis.map.toc.html#scene) classes.\n", |
| 235 | + "The previous `arcgis.widges` module contained the [MapView](https://developers.arcgis.com/python/api-reference/arcgis.widgets.html#mapview) class which served as the map widget in Jupyter notebooks. The Python API 2.4 release refactors the _MapView_ functionality into two new classes in the [`arcgis.map`](/python/api-reference/arcgis.map.toc.html) module: [_Map_](/python/api-reference/arcgis.map.toc.html#map) and [_Scene_](/api-reference/arcgis.map.toc.html#scene) classes.\n", |
236 | 236 | "\n",
|
237 | 237 | "In previous releases, maps and scenes were intialized based on the _mode_ argument entered in the [GIS.map()](/python/api-reference/arcgis.gis.toc.html#arcgis.gis.GIS.map) method, or by setting the [_mode_](/python/api-reference/arcgis.widgets.html#arcgis.widgets.MapView.mode) property of a _MapView_ object. Either way, you were always working with an instance of the _MapView_ class. You can still use the _mode_ argument when intializing the _gis.map()_ object, but rather than returning the same type of object, the default value of _2D_ will return a _Map_ object, and _3D_ will return a _Scene_ object. Refactoring the calls allowed Python development to align with the [web map specification](https://developers.arcgis.com/web-map-specification/) and the [web scene specification](https://developers.arcgis.com/web-map-specification/) directly. This will increase widget compatibility within notebooks to more closely reflect the browser experiences of the Map Viewer and Scene Viewer.\n",
|
238 | 238 | "\n",
|
|
245 | 245 | "|MapView class operation |Map class operation |Notes|\n",
|
246 | 246 | "|:- |:- |:- |\n",
|
247 | 247 | "|mview.add_layer()|m.content.add()|new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n",
|
248 |
| - "|mview.clear_graphics()|m.remove(index_position) *also m.content.remove_all()|new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n", |
| 248 | + "|mview.clear_graphics()|m.content.remove_all()|new [_MapContent_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map_widget.MapContent) class method\n", |
249 | 249 | "|mview.display_message()|NA|\n",
|
250 | 250 | "|mview.draw()|m.draw()|\n",
|
251 | 251 | "|mview.embed()|NA|\n",
|
|
300 | 300 | "id": "cf3137ae-d871-4e3b-8750-5f16a88502f8",
|
301 | 301 | "metadata": {},
|
302 | 302 | "source": [
|
303 |
| - "## New Modules" |
| 303 | + "## New `arcgis map` Module" |
304 | 304 | ]
|
305 | 305 | },
|
306 | 306 | {
|
307 |
| - "cell_type": "markdown", |
308 |
| - "id": "a119cda3-90e8-4218-a69c-9d8e8305b38a", |
| 307 | + "cell_type": "code", |
| 308 | + "execution_count": 7, |
| 309 | + "id": "321ede64-dd2d-4d0e-8443-0b6f7c3d259b", |
309 | 310 | "metadata": {},
|
| 311 | + "outputs": [], |
| 312 | + "source": [ |
| 313 | + "from arcgis.gis import GIS\n", |
| 314 | + "gis = GIS(profile=\"johnny_dino\")" |
| 315 | + ] |
| 316 | + }, |
| 317 | + { |
| 318 | + "cell_type": "code", |
| 319 | + "execution_count": 46, |
| 320 | + "id": "ccf933d2-2c60-4872-b0a9-76487db8ffd0", |
| 321 | + "metadata": {}, |
| 322 | + "outputs": [], |
310 | 323 | "source": [
|
311 |
| - "### `arcgis.map` module" |
| 324 | + "wm_item = gis.content.get(\"95c25c28709a4ccebf6d4cab92fe2d67\")" |
| 325 | + ] |
| 326 | + }, |
| 327 | + { |
| 328 | + "cell_type": "code", |
| 329 | + "execution_count": 72, |
| 330 | + "id": "4ea5d4da-70ce-4485-86ba-5de39bc6f03a", |
| 331 | + "metadata": {}, |
| 332 | + "outputs": [], |
| 333 | + "source": [ |
| 334 | + "ca14 = gis.content.get(\"4168272475c84e0599f876caca7a1ae9\")" |
312 | 335 | ]
|
313 | 336 | },
|
314 | 337 | {
|
315 | 338 | "cell_type": "markdown",
|
316 | 339 | "id": "71dfa756-839a-4816-833f-05942aa488d4",
|
317 | 340 | "metadata": {},
|
318 | 341 | "source": [
|
319 |
| - "#### The `Map` class" |
| 342 | + "### The `Map` class\n", |
| 343 | + "\n", |
| 344 | + "The new [_map_](/python/api-reference/arcgis.map.toc.html#arcgis.map.map) class was developed to align with the Jupyter Lab and Notebook 7 backend architecture and processing. The class includes many new properties which return auxiliary managment classes for more comprehensive management of a map and its content.\n", |
| 345 | + "\n", |
| 346 | + "* _bookmarks_ property - [Bookmarks]\n", |
| 347 | + "* _content_ property -\n", |
| 348 | + "* _basemap_ property -\n", |
| 349 | + "\n", |
| 350 | + "New widgets to provide increased visibility to map content:\n", |
| 351 | + "* _legend_ -\n", |
| 352 | + "* _layervisibility_ -\n", |
| 353 | + "* _layer_list_ -" |
320 | 354 | ]
|
321 | 355 | },
|
322 | 356 | {
|
323 | 357 | "cell_type": "markdown",
|
324 | 358 | "id": "05f7b7ef-b00f-4cc1-acf6-a96967562447",
|
325 | 359 | "metadata": {},
|
326 | 360 | "source": [
|
327 |
| - "#### The `Scene` Class" |
| 361 | + "### The `Scene` Class\n", |
| 362 | + "The new [_scene_](/python/api-reference/arcgis.map.toc.html#arcgis.map.Scene) class was developed to align with the Jupyter Lab and Notebook 7 backend architecture and processing." |
328 | 363 | ]
|
329 | 364 | },
|
330 | 365 | {
|
|
0 commit comments