Skip to content

Commit 8bd22f6

Browse files
committed
update map methods
1 parent 044642e commit 8bd22f6

File tree

1 file changed

+17
-95
lines changed

1 file changed

+17
-95
lines changed

samples/04_gis_analysts_data_scientists/which_areas_are_good_cougar_habitat.ipynb

Lines changed: 17 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -264,53 +264,14 @@
264264
},
265265
{
266266
"cell_type": "code",
267-
"execution_count": 8,
267+
"execution_count": null,
268268
"metadata": {
269269
"scrolled": false
270270
},
271-
"outputs": [
272-
{
273-
"data": {
274-
"application/vnd.jupyter.widget-view+json": {
275-
"model_id": "04cfd1d1958548ff82f2bff643ddc46e",
276-
"version_major": 2,
277-
"version_minor": 0
278-
},
279-
"text/plain": [
280-
"MapView(layout=Layout(height='400px', width='100%'))"
281-
]
282-
},
283-
"metadata": {},
284-
"output_type": "display_data"
285-
},
286-
{
287-
"data": {
288-
"text/html": [
289-
"<div class=\"map-static-img-preview-4f0f1172-7d2c-42de-9e54-ca39044503b3\"><img src=\"\"></img></div>"
290-
],
291-
"text/plain": [
292-
"<IPython.core.display.HTML object>"
293-
]
294-
},
295-
"metadata": {},
296-
"output_type": "display_data"
297-
},
298-
{
299-
"data": {
300-
"text/html": [
301-
"<div class=\"map-html-embed-preview-4f0f1172-7d2c-42de-9e54-ca39044503b3\"></div>"
302-
],
303-
"text/plain": [
304-
"<IPython.core.display.HTML object>"
305-
]
306-
},
307-
"metadata": {},
308-
"output_type": "display_data"
309-
}
310-
],
271+
"outputs": [],
311272
"source": [
312273
"m1 = gis.map('oregon')\n",
313-
"m1.basemap = 'arcgis-light-gray'\n",
274+
"m1.basemap.basemap = 'gray-vector'\n",
314275
"m1"
315276
]
316277
},
@@ -328,7 +289,7 @@
328289
"outputs": [],
329290
"source": [
330291
"m1.zoom_to_layer(state_park)\n",
331-
"m1.add_layer(state_park)"
292+
"m1.content.add(state_park)"
332293
]
333294
},
334295
{
@@ -465,7 +426,7 @@
465426
],
466427
"source": [
467428
"m2 = gis.map('oregon')\n",
468-
"m2.basemap = 'arcgis-light-gray'\n",
429+
"m2.basemap.basemap = 'gray-vector'\n",
469430
"m2"
470431
]
471432
},
@@ -484,7 +445,7 @@
484445
"outputs": [],
485446
"source": [
486447
"m2.zoom_to_layer(buffer_park.layers[0])\n",
487-
"m2.add_layer(buffer_park.layers[0])"
448+
"m2.content.add(buffer_park.layers[0])"
488449
]
489450
},
490451
{
@@ -582,53 +543,14 @@
582543
},
583544
{
584545
"cell_type": "code",
585-
"execution_count": 17,
546+
"execution_count": null,
586547
"metadata": {
587548
"scrolled": false
588549
},
589-
"outputs": [
590-
{
591-
"data": {
592-
"application/vnd.jupyter.widget-view+json": {
593-
"model_id": "9eb4029722584b1db08a6a4fb15074d8",
594-
"version_major": 2,
595-
"version_minor": 0
596-
},
597-
"text/plain": [
598-
"MapView(layout=Layout(height='400px', width='100%'))"
599-
]
600-
},
601-
"metadata": {},
602-
"output_type": "display_data"
603-
},
604-
{
605-
"data": {
606-
"text/html": [
607-
"<div class=\"map-static-img-preview-e0ad5959-2704-4011-92fe-e67fef8725ad\"><img src=\"\"></img></div>"
608-
],
609-
"text/plain": [
610-
"<IPython.core.display.HTML object>"
611-
]
612-
},
613-
"metadata": {},
614-
"output_type": "display_data"
615-
},
616-
{
617-
"data": {
618-
"text/html": [
619-
"<div class=\"map-html-embed-preview-e0ad5959-2704-4011-92fe-e67fef8725ad\"></div>"
620-
],
621-
"text/plain": [
622-
"<IPython.core.display.HTML object>"
623-
]
624-
},
625-
"metadata": {},
626-
"output_type": "display_data"
627-
}
628-
],
550+
"outputs": [],
629551
"source": [
630552
"m3 = gis.map('oregon')\n",
631-
"m3.basemap = 'arcgis-light-gray'\n",
553+
"m3.basemap.basemap = 'gray-vector'\n",
632554
"m3"
633555
]
634556
},
@@ -647,7 +569,7 @@
647569
"outputs": [],
648570
"source": [
649571
"m3.zoom_to_layer(state_area_boundary.layers[0])\n",
650-
"m3.add_layer(state_area_boundary.layers[0])"
572+
"m3.content.add(state_area_boundary.layers[0])"
651573
]
652574
},
653575
{
@@ -831,7 +753,7 @@
831753
],
832754
"source": [
833755
"m4 = gis.map('oregon')\n",
834-
"m4.basemap = 'arcgis-light-gray'\n",
756+
"m4.basemap.basemap = 'gray-vector'\n",
835757
"m4"
836758
]
837759
},
@@ -849,8 +771,8 @@
849771
"outputs": [],
850772
"source": [
851773
"m4.zoom_to_layer(clipped_highway_lyr)\n",
852-
"m4.add_layer(state_area_boundary)\n",
853-
"m4.add_layer(clipped_highway_lyr)"
774+
"m4.content.add(state_area_boundary)\n",
775+
"m4.content.add(clipped_highway_lyr)"
854776
]
855777
},
856778
{
@@ -998,7 +920,7 @@
998920
],
999921
"source": [
1000922
"m5 = gis.map('oregon')\n",
1001-
"m5.basemap = 'arcgis-light-gray'\n",
923+
"m5.basemap.basemap = 'gray-vector'\n",
1002924
"m5"
1003925
]
1004926
},
@@ -1017,7 +939,7 @@
1017939
"outputs": [],
1018940
"source": [
1019941
"m5.zoom_to_layer(potential_cougar_habitat_A.layers[0])\n",
1020-
"m5.add_layer(potential_cougar_habitat_A)"
942+
"m5.content.add(potential_cougar_habitat_A)"
1021943
]
1022944
},
1023945
{
@@ -1122,7 +1044,7 @@
11221044
],
11231045
"source": [
11241046
"m6 = gis.map('oregon')\n",
1125-
"m6.basemap = 'arcgis-light-gray'\n",
1047+
"m6.basemap.basemap = 'gray-vector'\n",
11261048
"m6"
11271049
]
11281050
},
@@ -1141,7 +1063,7 @@
11411063
"outputs": [],
11421064
"source": [
11431065
"m6.zoom_to_layer(potential_cougar_habitat_B.layers[0])\n",
1144-
"m6.add_layer(potential_cougar_habitat_B)"
1066+
"m6.content.add(potential_cougar_habitat_B)"
11451067
]
11461068
},
11471069
{

0 commit comments

Comments
 (0)