|
9 | 9 | },
|
10 | 10 | {
|
11 | 11 | "cell_type": "markdown",
|
12 |
| - "metadata": { |
13 |
| - "toc": true |
14 |
| - }, |
| 12 | + "metadata": {}, |
15 | 13 | "source": [
|
16 | 14 | "<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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </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 </span>Updating a web scene</a></span></li></ul></li></ul></li></ul></div>" |
18 | 16 | ]
|
19 | 17 | },
|
20 | 18 | {
|
|
425 | 423 | "metadata": {},
|
426 | 424 | "source": [
|
427 | 425 | "### 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." |
429 | 427 | ]
|
430 | 428 | },
|
431 | 429 | {
|
|
506 | 504 | "cell_type": "markdown",
|
507 | 505 | "metadata": {},
|
508 | 506 | "source": [
|
509 |
| - "## Searching for web scene items" |
| 507 | + "### Searching for web scene items" |
510 | 508 | ]
|
511 | 509 | },
|
512 | 510 | {
|
513 | 511 | "cell_type": "code",
|
514 |
| - "execution_count": 78, |
| 512 | + "execution_count": 6, |
515 | 513 | "metadata": {},
|
516 | 514 | "outputs": [
|
517 | 515 | {
|
|
524 | 522 | " <Item title:\"Toprical Cyclones - Basemap updated\" type:Web Scene owner:arcgis_python>,\n",
|
525 | 523 | " <Item title:\"Toprical Cyclones - Summer\" type:Web Scene owner:arcgis_python>,\n",
|
526 | 524 | " <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", |
528 | 525 | " <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", |
529 | 527 | " <Item title:\"Toprical Cyclones - Basemap updated 2\" type:Web Scene owner:arcgis_python>]"
|
530 | 528 | ]
|
531 | 529 | },
|
532 |
| - "execution_count": 78, |
| 530 | + "execution_count": 6, |
533 | 531 | "metadata": {},
|
534 | 532 | "output_type": "execute_result"
|
535 | 533 | }
|
|
548 | 546 | },
|
549 | 547 | {
|
550 | 548 | "cell_type": "code",
|
551 |
| - "execution_count": 79, |
| 549 | + "execution_count": 7, |
552 | 550 | "metadata": {},
|
553 | 551 | "outputs": [
|
554 | 552 | {
|
|
566 | 564 | " </a>\n",
|
567 | 565 | " <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",
|
568 | 566 | " <br/>Last Modified: August 12, 2024\n",
|
569 |
| - " <br/>0 comments, 0 views\n", |
| 567 | + " <br/>0 comments, 14 views\n", |
570 | 568 | " </div>\n",
|
571 | 569 | " </div>\n",
|
572 | 570 | " "
|
|
575 | 573 | "<Item title:\"Recent Storm Scene\" type:Web Scene owner:arcgis_python>"
|
576 | 574 | ]
|
577 | 575 | },
|
578 |
| - "execution_count": 79, |
| 576 | + "execution_count": 7, |
579 | 577 | "metadata": {},
|
580 | 578 | "output_type": "execute_result"
|
581 | 579 | }
|
582 | 580 | ],
|
583 | 581 | "source": [
|
584 |
| - "webscene_item = webscene_search[8]\n", |
| 582 | + "webscene_item = webscene_search[7]\n", |
585 | 583 | "webscene_item"
|
586 | 584 | ]
|
587 | 585 | },
|
588 | 586 | {
|
589 | 587 | "cell_type": "markdown",
|
590 | 588 | "metadata": {},
|
591 | 589 | "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:" |
594 | 598 | ]
|
595 | 599 | },
|
596 | 600 | {
|
597 | 601 | "cell_type": "code",
|
598 |
| - "execution_count": 188, |
| 602 | + "execution_count": 8, |
599 | 603 | "metadata": {},
|
600 | 604 | "outputs": [],
|
601 | 605 | "source": [
|
602 | 606 | "from arcgis.map import Scene\n",
|
603 | 607 | "\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": [ |
604 | 644 | "scene_obj = Scene(\n",
|
605 | 645 | " item=webscene_item\n",
|
606 | 646 | ")"
|
|
0 commit comments