Skip to content

Commit 4ae0f68

Browse files
committed
update text and remove broken links
1 parent 2e03440 commit 4ae0f68

File tree

1 file changed

+37
-39
lines changed

1 file changed

+37
-39
lines changed

guide/10-mapping-and-visualization/using-the-map-widget.ipynb

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"cell_type": "markdown",
2222
"metadata": {},
2323
"source": [
24-
"## Using the map widget\n",
25-
"The `GIS` object includes a map widget for displaying geographic locations, visualizing GIS content, as well as the results of your analysis. To use the map widget, call `gis.map()` and assign it to a variable, that you can then query to bring up the widget in the notebook:"
24+
"## The map widget\n",
25+
"The `GIS` object includes a map widget for displaying geographic locations, visualizing GIS content, as well as the results of your analysis. To use the map widget, call `gis.map()` and assign it to a variable that you can then query to bring up the widget in the notebook:"
2626
]
2727
},
2828
{
@@ -236,6 +236,16 @@
236236
"To see which basemaps are available for use with the map widget, use the Map's `basemap` property to initialize a BasemapManager, and then use the `basemaps` property to return a list of basemaps currently configured with the organization:"
237237
]
238238
},
239+
{
240+
"cell_type": "code",
241+
"execution_count": 5,
242+
"metadata": {},
243+
"outputs": [],
244+
"source": [
245+
"from arcgis.gis import GIS\n",
246+
"gis = GIS(profile=\"your_online_profile\")"
247+
]
248+
},
239249
{
240250
"cell_type": "code",
241251
"execution_count": 32,
@@ -388,16 +398,6 @@
388398
"See below for an animation preview of some of the basemaps listed above:"
389399
]
390400
},
391-
{
392-
"cell_type": "code",
393-
"execution_count": 5,
394-
"metadata": {},
395-
"outputs": [],
396-
"source": [
397-
"from arcgis.gis import GIS\n",
398-
"gis = GIS()"
399-
]
400-
},
401401
{
402402
"cell_type": "code",
403403
"execution_count": 6,
@@ -562,15 +562,15 @@
562562
"cell_type": "markdown",
563563
"metadata": {},
564564
"source": [
565-
"Read more about 3D mode by reading the [advanced map widget useage](../advanced-map-widget-useage) guide page, or by reading the [API reference](https://developers.arcgis.com/python/api-reference/arcgis.widgets.html#mapview)."
565+
"Read more about 3D mode by reading the [advanced map widget useage](../advanced-map-widget-usage) guide page, or by reading the [API reference](https://developers.arcgis.com/python/api-reference/arcgis.map.toc.html#scene)."
566566
]
567567
},
568568
{
569569
"cell_type": "markdown",
570570
"metadata": {},
571571
"source": [
572572
"## Adding layers to the map\n",
573-
"An important functionality of the map widget is its ability to add and render GIS layers. To a layer call the .content.add()` method and pass the layer object as an argument."
573+
"An important functionality of the map widget is its ability to add and render GIS layers. To add a layer call the `.content.add()` method and pass the layer object as an argument."
574574
]
575575
},
576576
{
@@ -604,7 +604,7 @@
604604
"metadata": {},
605605
"source": [
606606
"### Adding `Item` objects to the map\n",
607-
"You can add `Item` objects to a map by passing it to the .content.add()` method."
607+
"You can add `Item` objects to a map by passing it to the `.content.add()` method."
608608
]
609609
},
610610
{
@@ -717,7 +717,7 @@
717717
}
718718
],
719719
"source": [
720-
"fimg_map = gis.map()\n",
720+
"img_map = gis.map()\n",
721721
"img_map"
722722
]
723723
},
@@ -783,7 +783,7 @@
783783
"metadata": {},
784784
"source": [
785785
"## Listing the layers added to the map\n",
786-
"You can list the layers added to be map using the `layers` property."
786+
"You can list the layers added to the map using the _MapContent_ (accessed from the _content_ property of a map object) object's `layers` property."
787787
]
788788
},
789789
{
@@ -807,33 +807,31 @@
807807
]
808808
},
809809
{
810-
"cell_type": "code",
811-
"execution_count": 180,
810+
"cell_type": "markdown",
812811
"metadata": {},
813-
"outputs": [
814-
{
815-
"data": {
816-
"text/plain": [
817-
"[<FeatureLayer url:\"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Time_Zones/FeatureServer/0\">]"
818-
]
819-
},
820-
"execution_count": 180,
821-
"metadata": {},
822-
"output_type": "execute_result"
823-
}
824-
],
825812
"source": [
826-
"usa_map.content.layers"
813+
"## Removing layers from the map\n",
814+
"To remove one or more layers, call the `remove()` method on the _Map_ object, and pass a layer index value (or list of indexes) of the layer to remove. To get a list of valid layers that can be removed and their index positions, enumerate the _map.content.layers_ output:.\n",
815+
"\n",
816+
"The code below shows how to remove the timezone layers from the map we drew earlier:"
827817
]
828818
},
829819
{
830-
"cell_type": "markdown",
820+
"cell_type": "code",
821+
"execution_count": 2,
831822
"metadata": {},
823+
"outputs": [
824+
{
825+
"name": "stdout",
826+
"output_type": "stream",
827+
"text": [
828+
"0 <FeatureLayer url:\"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Time_Zones/FeatureServer/0\">\n"
829+
]
830+
}
831+
],
832832
"source": [
833-
"## Removing layers from the map\n",
834-
"To remove one or more layers, call the `remove_layers()` method and pass a list of layers that you want removed. To get a list of valid layers that can be removed, call the `layers` property as shown in the previous cell.\n",
835-
"\n",
836-
"The code below shows how to remove the timezone layers from the map we drew earlier:"
833+
"for idx,lyr in enumerate(usa_map.content.layers):\n",
834+
" print(f\"{idx:<6}{lyr}\")"
837835
]
838836
},
839837
{
@@ -943,7 +941,7 @@
943941
"metadata": {},
944942
"source": [
945943
"### Drawing `FeatureSet` objects on the map\n",
946-
"In addition to sketches, you can send `FeatureSet` objects to the `draw()` method. This capability comes in handy as you can get a `FeatureSet` object through various different operations using the Python API. For instance, you can get results of a `geocoding` operation as a `FeatureSet`, results of a `query()` operation on a `FeatureLayer` as a `FeatureSet` that can you visualize on the map using the `draw()` method.\n",
944+
"In addition to sketches, you can send `FeatureSet` objects to the `draw()` method. This capability comes in handy as you can get a `FeatureSet` object through various different operations using the Python API. For instance, you can get results of a `geocoding` operation as a `FeatureSet` or the results of a `query()` operation on a `FeatureLayer` as a `FeatureSet` that can you visualize on the map using the `draw()` method and a defined symbol.\n",
947945
"\n",
948946
"The snippet below geocodes the locations of a few capitol buildings in the USA."
949947
]
@@ -999,7 +997,7 @@
999997
"metadata": {},
1000998
"source": [
1001999
"### Drawing with custom symbols\n",
1002-
"While drawing a graphic, you can specify a custom symbol. Users of the Python API can make use of a custom [symbol selector web app]() and pick a symbol for point layers. For instance, you can pick a business marker symbol for the capitol buildings as shown below:"
1000+
"While drawing a graphic, you can specify a custom symbol. For instance, you can pick a business marker symbol from a url for the capitol buildings as shown below:"
10031001
]
10041002
},
10051003
{

0 commit comments

Comments
 (0)