Skip to content

Commit

Permalink
fix typos, toc, and add cell blocks for empty scene
Browse files Browse the repository at this point in the history
  • Loading branch information
jyaistMap committed Aug 14, 2024
1 parent 2ed3e2b commit ac531a3
Showing 1 changed file with 56 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
},
{
"cell_type": "markdown",
"metadata": {
"toc": true
},
"metadata": {},
"source": [
"<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n",
"<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>"
"<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>"
]
},
{
Expand Down Expand Up @@ -425,7 +423,7 @@
"metadata": {},
"source": [
"### Adding layers to a web map\n",
"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."
"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."
]
},
{
Expand Down Expand Up @@ -506,12 +504,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Searching for web scene items"
"### Searching for web scene items"
]
},
{
"cell_type": "code",
"execution_count": 78,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -524,12 +522,12 @@
" <Item title:\"Toprical Cyclones - Basemap updated\" type:Web Scene owner:arcgis_python>,\n",
" <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
" <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
" <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
" <Item title:\"Recent Storm Scene\" type:Web Scene owner:arcgis_python>,\n",
" <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
" <Item title:\"Toprical Cyclones - Basemap updated 2\" type:Web Scene owner:arcgis_python>]"
]
},
"execution_count": 78,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -548,7 +546,7 @@
},
{
"cell_type": "code",
"execution_count": 79,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand All @@ -566,7 +564,7 @@
" </a>\n",
" <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",
" <br/>Last Modified: August 12, 2024\n",
" <br/>0 comments, 0 views\n",
" <br/>0 comments, 14 views\n",
" </div>\n",
" </div>\n",
" "
Expand All @@ -575,32 +573,74 @@
"<Item title:\"Recent Storm Scene\" type:Web Scene owner:arcgis_python>"
]
},
"execution_count": 79,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"webscene_item = webscene_search[8]\n",
"webscene_item = webscene_search[7]\n",
"webscene_item"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Creating a `Scene` object\n",
"You can create a `Scene` object by passing an existing web scene item as the `Scene` class's _item_ argument:"
"### Creating a `Scene` object"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can create an emtpy Scene the same way you create an empty map:"
]
},
{
"cell_type": "code",
"execution_count": 188,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"from arcgis.map import Scene\n",
"\n",
"empty_scene = Scene()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"empty_scene.content.layers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can create a `Scene` object by passing an existing web scene item as the `Scene` class's _item_ argument:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"scene_obj = Scene(\n",
" item=webscene_item\n",
")"
Expand Down

0 comments on commit ac531a3

Please sign in to comment.