Skip to content

Commit 4024749

Browse files
authored
Merge pull request #1966 from Esri/analysis_sample6
Update calc nXn od cost matrix sample
2 parents 5cdfd7a + f3da975 commit 4024749

File tree

2 files changed

+712
-5
lines changed

2 files changed

+712
-5
lines changed

samples/04_gis_analysts_data_scientists/calculating_cost_surfaces_using_weighted_overlay_analysis.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"source": [
5252
"# import GIS from the arcgis.gis module\n",
5353
"from arcgis.gis import GIS\n",
54-
"from arcgis.features import FeatureLayer"
54+
"from arcgis.layers import Service"
5555
]
5656
},
5757
{
@@ -186,7 +186,7 @@
186186
"source": [
187187
"# Access the USA States item from the Living Atlas using the item id value\n",
188188
"url = 'https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_States_Generalized/FeatureServer/0'\n",
189-
"states_lyr = FeatureLayer(url)\n",
189+
"states_lyr = Service(url)\n",
190190
"states_lyr"
191191
]
192192
},
@@ -764,10 +764,10 @@
764764
"source": [
765765
"# Create a map to display the persistent analysis result in a map\n",
766766
"map1 = gis.map('State of Washington, USA')\n",
767-
"map1.add_layer(search_persistent_result)\n",
767+
"map1.content.add(search_persistent_result)\n",
768768
"# Create a map to display the dynamic analysis result in another map.\n",
769769
"map2 = gis.map('State of Washington, USA')\n",
770-
"map2.add_layer(result_weighted_overlay)"
770+
"map2.content.add(result_weighted_overlay)"
771771
]
772772
},
773773
{

samples/04_gis_analysts_data_scientists/calculating_nXn_od_cost_matrix.ipynb

Lines changed: 708 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)