Skip to content

Commit f5183e5

Browse files
authored
Merge pull request #1901 from jyaistMap/jy-upd-wmaps-wscenes
fix typos, toc, and add cell blocks for empty scene
2 parents f44f7ed + ac531a3 commit f5183e5

File tree

1 file changed

+56
-16
lines changed

1 file changed

+56
-16
lines changed

guide/10-mapping-and-visualization/working-with-web-maps-and-web-scenes.ipynb

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
},
1010
{
1111
"cell_type": "markdown",
12-
"metadata": {
13-
"toc": true
14-
},
12+
"metadata": {},
1513
"source": [
1614
"<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n",
17-
"<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#Working-with-web-maps-and-web-scenes\" data-toc-modified-id=\"Working-with-web-maps-and-web-scenes-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>Working with web maps and web scenes</a></span><ul class=\"toc-item\"><li><span><a href=\"#Working-with-web-maps\" data-toc-modified-id=\"Working-with-web-maps-1.1\"><span class=\"toc-item-num\">1.1&nbsp;&nbsp;</span>Working with web maps</a></span><ul class=\"toc-item\"><li><span><a href=\"#Searching-for-web-maps\" data-toc-modified-id=\"Searching-for-web-maps-1.1.1\"><span class=\"toc-item-num\">1.1.1&nbsp;&nbsp;</span>Searching for web maps</a></span></li><li><span><a href=\"#Creating-a-WebMap-object\" data-toc-modified-id=\"Creating-a-WebMap-object-1.1.2\"><span class=\"toc-item-num\">1.1.2&nbsp;&nbsp;</span>Creating a <code>WebMap</code> object</a></span></li><li><span><a href=\"#Displaying-the-web-map\" data-toc-modified-id=\"Displaying-the-web-map-1.1.3\"><span class=\"toc-item-num\">1.1.3&nbsp;&nbsp;</span>Displaying the web map</a></span></li><li><span><a href=\"#Removing-layers-from-a-web-map\" data-toc-modified-id=\"Removing-layers-from-a-web-map-1.1.4\"><span class=\"toc-item-num\">1.1.4&nbsp;&nbsp;</span>Removing layers from a web map</a></span></li><li><span><a href=\"#Adding-layers-to-a-web-map\" data-toc-modified-id=\"Adding-layers-to-a-web-map-1.1.5\"><span class=\"toc-item-num\">1.1.5&nbsp;&nbsp;</span>Adding layers to a web map</a></span></li><li><span><a href=\"#Saving-or-Updating-a-web-map\" data-toc-modified-id=\"Saving-or-Updating-a-web-map-1.1.6\"><span class=\"toc-item-num\">1.1.6&nbsp;&nbsp;</span>Saving or Updating a web map</a></span></li></ul></li><li><span><a href=\"#Working-with-web-scenes\" data-toc-modified-id=\"Working-with-web-scenes-1.2\"><span class=\"toc-item-num\">1.2&nbsp;&nbsp;</span>Working with web scenes</a></span></li><li><span><a href=\"#Searching-for-web-scene-items\" data-toc-modified-id=\"Searching-for-web-scene-items-1.3\"><span class=\"toc-item-num\">1.3&nbsp;&nbsp;</span>Searching for web scene items</a></span><ul class=\"toc-item\"><li><span><a href=\"#Creating-a-WebScene-object\" data-toc-modified-id=\"Creating-a-WebScene-object-1.3.1\"><span class=\"toc-item-num\">1.3.1&nbsp;&nbsp;</span>Creating a <code>WebScene</code> object</a></span></li><li><span><a href=\"#Displaying-the-web-scene\" data-toc-modified-id=\"Displaying-the-web-scene-1.3.2\"><span class=\"toc-item-num\">1.3.2&nbsp;&nbsp;</span>Displaying the web scene</a></span></li><li><span><a href=\"#Updating-a-web-scene\" data-toc-modified-id=\"Updating-a-web-scene-1.3.3\"><span class=\"toc-item-num\">1.3.3&nbsp;&nbsp;</span>Updating a web scene</a></span></li></ul></li></ul></li></ul></div>"
15+
"<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#Working-with-web-maps-and-web-scenes\" data-toc-modified-id=\"Working-with-web-maps-and-web-scenes-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>Working with web maps and web scenes</a></span><ul class=\"toc-item\"><li><span><a href=\"#Working-with-web-maps\" data-toc-modified-id=\"Working-with-web-maps-1.1\"><span class=\"toc-item-num\">1.1&nbsp;&nbsp;</span>Working with web maps</a></span><ul class=\"toc-item\"><li><span><a href=\"#Searching-for-web-maps\" data-toc-modified-id=\"Searching-for-web-maps-1.1.1\"><span class=\"toc-item-num\">1.1.1&nbsp;&nbsp;</span>Searching for web maps</a></span></li><li><span><a href=\"#Creating-a-WebMap-object\" data-toc-modified-id=\"Creating-a-WebMap-object-1.1.2\"><span class=\"toc-item-num\">1.1.2&nbsp;&nbsp;</span>Creating a <code>WebMap</code> object</a></span></li><li><span><a href=\"#Displaying-the-web-map\" data-toc-modified-id=\"Displaying-the-web-map-1.1.3\"><span class=\"toc-item-num\">1.1.3&nbsp;&nbsp;</span>Displaying the web map</a></span></li><li><span><a href=\"#Removing-layers-from-a-web-map\" data-toc-modified-id=\"Removing-layers-from-a-web-map-1.1.4\"><span class=\"toc-item-num\">1.1.4&nbsp;&nbsp;</span>Removing layers from a web map</a></span></li><li><span><a href=\"#Adding-layers-to-a-web-map\" data-toc-modified-id=\"Adding-layers-to-a-web-map-1.1.5\"><span class=\"toc-item-num\">1.1.5&nbsp;&nbsp;</span>Adding layers to a web map</a></span></li><li><span><a href=\"#Saving-or-Updating-a-web-map\" data-toc-modified-id=\"Saving-or-Updating-a-web-map-1.1.6\"><span class=\"toc-item-num\">1.1.6&nbsp;&nbsp;</span>Saving or Updating a web map</a></span></li></ul></li><li><span><a href=\"#Working-with-web-scenes\" data-toc-modified-id=\"Working-with-web-scenes-1.2\"><span class=\"toc-item-num\">1.2&nbsp;&nbsp;</span>Working with web scenes</a></span></li><ul class=\"toc-item\"><li><span><a href=\"#Searching-for-web-scene-items\" data-toc-modified-id=\"Searching-for-web-scene-items-1.2.1\"><span class=\"toc-item-num\">1.2.1&nbsp;&nbsp;</span>Searching for web scene items</a></span><li><span><a href=\"#Creating-a-WebScene-object\" data-toc-modified-id=\"Creating-a-WebScene-object-1.2.2\"><span class=\"toc-item-num\">1.2.2&nbsp;&nbsp;</span>Creating a <code>WebScene</code> object</a></span></li><li><span><a href=\"#Displaying-the-web-scene\" data-toc-modified-id=\"Displaying-the-web-scene-1.2.3\"><span class=\"toc-item-num\">1.2.3&nbsp;&nbsp;</span>Displaying the web scene</a></span></li><li><span><a href=\"#Updating-a-web-scene\" data-toc-modified-id=\"Updating-a-web-scene-1.2.4\"><span class=\"toc-item-num\">1.2.4&nbsp;&nbsp;</span>Updating a web scene</a></span></li></ul></li></ul></li></ul></div>"
1816
]
1917
},
2018
{
@@ -425,7 +423,7 @@
425423
"metadata": {},
426424
"source": [
427425
"### Adding layers to a web map\n",
428-
"To add new layers, call the `Map.content.add()` method. You can add many different types of layers with this method, such as `FeatureLayer`, `ImageryLayer`, or `FeatureCollection` objects, as well as using `Items` as input. The code below adds a feature layer collection item to the web map and updates the layer's title property at the same timeC."
426+
"To add new layers, call the `Map.content.add()` method. You can add many different types of layers with this method, such as `FeatureLayer`, `ImageryLayer`, or `FeatureCollection` objects, as well as using `Items` as input. The code below adds a feature layer collection item to the web map and updates the layer's title property at the same time."
429427
]
430428
},
431429
{
@@ -506,12 +504,12 @@
506504
"cell_type": "markdown",
507505
"metadata": {},
508506
"source": [
509-
"## Searching for web scene items"
507+
"### Searching for web scene items"
510508
]
511509
},
512510
{
513511
"cell_type": "code",
514-
"execution_count": 78,
512+
"execution_count": 6,
515513
"metadata": {},
516514
"outputs": [
517515
{
@@ -524,12 +522,12 @@
524522
" <Item title:\"Toprical Cyclones - Basemap updated\" type:Web Scene owner:arcgis_python>,\n",
525523
" <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
526524
" <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
527-
" <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
528525
" <Item title:\"Recent Storm Scene\" type:Web Scene owner:arcgis_python>,\n",
526+
" <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
529527
" <Item title:\"Toprical Cyclones - Basemap updated 2\" type:Web Scene owner:arcgis_python>]"
530528
]
531529
},
532-
"execution_count": 78,
530+
"execution_count": 6,
533531
"metadata": {},
534532
"output_type": "execute_result"
535533
}
@@ -548,7 +546,7 @@
548546
},
549547
{
550548
"cell_type": "code",
551-
"execution_count": 79,
549+
"execution_count": 7,
552550
"metadata": {},
553551
"outputs": [
554552
{
@@ -566,7 +564,7 @@
566564
" </a>\n",
567565
" <br/>Global scene of recent hurricanes, cyclones, and typhoons<br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/websceneglobal16.png' style=\"vertical-align:middle;\" width=16 height=16>Web Scene by arcgis_python\n",
568566
" <br/>Last Modified: August 12, 2024\n",
569-
" <br/>0 comments, 0 views\n",
567+
" <br/>0 comments, 14 views\n",
570568
" </div>\n",
571569
" </div>\n",
572570
" "
@@ -575,32 +573,74 @@
575573
"<Item title:\"Recent Storm Scene\" type:Web Scene owner:arcgis_python>"
576574
]
577575
},
578-
"execution_count": 79,
576+
"execution_count": 7,
579577
"metadata": {},
580578
"output_type": "execute_result"
581579
}
582580
],
583581
"source": [
584-
"webscene_item = webscene_search[8]\n",
582+
"webscene_item = webscene_search[7]\n",
585583
"webscene_item"
586584
]
587585
},
588586
{
589587
"cell_type": "markdown",
590588
"metadata": {},
591589
"source": [
592-
"### Creating a `Scene` object\n",
593-
"You can create a `Scene` object by passing an existing web scene item as the `Scene` class's _item_ argument:"
590+
"### Creating a `Scene` object"
591+
]
592+
},
593+
{
594+
"cell_type": "markdown",
595+
"metadata": {},
596+
"source": [
597+
"You can create an emtpy Scene the same way you create an empty map:"
594598
]
595599
},
596600
{
597601
"cell_type": "code",
598-
"execution_count": 188,
602+
"execution_count": 8,
599603
"metadata": {},
600604
"outputs": [],
601605
"source": [
602606
"from arcgis.map import Scene\n",
603607
"\n",
608+
"empty_scene = Scene()"
609+
]
610+
},
611+
{
612+
"cell_type": "code",
613+
"execution_count": 2,
614+
"metadata": {},
615+
"outputs": [
616+
{
617+
"data": {
618+
"text/plain": [
619+
"[]"
620+
]
621+
},
622+
"execution_count": 2,
623+
"metadata": {},
624+
"output_type": "execute_result"
625+
}
626+
],
627+
"source": [
628+
"empty_scene.content.layers"
629+
]
630+
},
631+
{
632+
"cell_type": "markdown",
633+
"metadata": {},
634+
"source": [
635+
"You can create a `Scene` object by passing an existing web scene item as the `Scene` class's _item_ argument:"
636+
]
637+
},
638+
{
639+
"cell_type": "code",
640+
"execution_count": 9,
641+
"metadata": {},
642+
"outputs": [],
643+
"source": [
604644
"scene_obj = Scene(\n",
605645
" item=webscene_item\n",
606646
")"

0 commit comments

Comments
 (0)