|
13 | 13 | "id": "6772bf0f-2a6b-438a-8757-472398dd3dc6", |
14 | 14 | "metadata": {}, |
15 | 15 | "source": [ |
16 | | - "ArcGIS StoryMaps is a web-based content-creation and communication tool that allows you to share maps, apps, and multimedia in the context of a narrative. You can use ArcGIS StoryMaps to author stories, which are like articles or blogs. Stories offer a scrolling narrative experience with immersive sections and can integrate maps and data from your organization. It is an application supported in both ArcGIS Enterprise and ArcGIS Online. " |
| 16 | + "ArcGIS StoryMaps is a web-based content-creation and communication tool that allows you to share maps, apps, and multimedia in the context of a narrative. You can use ArcGIS StoryMaps to author stories, which are similar to articles or blogs. Stories offer a scrolling narrative experience with immersive sections and can integrate maps and data from your organization. It is an application supported in both ArcGIS Enterprise and ArcGIS Online. " |
17 | 17 | ] |
18 | 18 | }, |
19 | 19 | { |
20 | 20 | "cell_type": "code", |
21 | | - "execution_count": 85, |
| 21 | + "execution_count": 1, |
22 | 22 | "id": "cf9da6fa-a5c8-4e10-b09e-7cf2ec45c3c1", |
23 | 23 | "metadata": {}, |
24 | 24 | "outputs": [], |
|
41 | 41 | }, |
42 | 42 | { |
43 | 43 | "cell_type": "code", |
44 | | - "execution_count": 86, |
| 44 | + "execution_count": 2, |
45 | 45 | "id": "6661719a-fe2a-4dae-b510-6ca45f80c89d", |
46 | 46 | "metadata": {}, |
47 | 47 | "outputs": [], |
|
92 | 92 | "* [Cover](https://developers.arcgis.com/python/latest/api-reference/arcgis.apps.storymap.html#cover)\n", |
93 | 93 | "* [Separator](https://developers.arcgis.com/python/latest/api-reference/arcgis.apps.storymap.html#separator)\n", |
94 | 94 | "\n", |
95 | | - "As we see in the list above, content can be of various class types and you have the option to specify a `caption`, `alt_text`, `display` style, and the `position` at which it will be in your story while adding the particular content element to your story. Not passing in any content means a separator will be added.\n", |
| 95 | + "As we see in the list above, content can be of various class types and you have the option to specify a `caption`, `alt_text`, `display` style, and the `position` at which it will be in your story while adding the particular content element to your story. \n", |
96 | 96 | "\n", |
97 | | - "Let us understand this process of adding content to our story through examples of some popular content element types. " |
| 97 | + "Below we will go through different examples of content being added to a story. " |
98 | 98 | ] |
99 | 99 | }, |
100 | 100 | { |
|
104 | 104 | "source": [ |
105 | 105 | "### 1. Adding text to describe the theme of the StoryMap\n", |
106 | 106 | "\n", |
107 | | - "We will start by adding `Text` to our story, specifically a Heading for the story using the `style` parameter." |
| 107 | + "\n", |
| 108 | + "You can add `Text` to your story by providing the text string of choice to the`text` parameter of this [Text class](https://developers.arcgis.com/python/latest/api-reference/arcgis.apps.storymap.html#text).\n", |
| 109 | + "\n", |
| 110 | + "You can also specify the `style` you would like to render your text in, using the following [`TextStyles` enumeration](https://developers.arcgis.com/python/latest/api-reference/arcgis.apps.storymap.html#arcgis.apps.storymap.story_content.TextStyles) values supported in the ArcGIS API for Python.\n", |
| 111 | + "\n", |
| 112 | + "* BULLETLIST = 'bullet-list'\n", |
| 113 | + "* NUMBERLIST = 'numbered-list'\n", |
| 114 | + "* HEADING = 'h2'\n", |
| 115 | + "* SUBHEADING = 'h3'\n", |
| 116 | + "* HEADING1 = 'h2'\n", |
| 117 | + "* HEADING2 = 'h3'\n", |
| 118 | + "* HEADING3 = 'h4'\n", |
| 119 | + "* PARAGRAPH = 'paragraph'\n", |
| 120 | + "* QUOTE = 'quote'\n", |
| 121 | + "\n", |
| 122 | + "\n", |
| 123 | + "We will start by adding a Heading for the story using the `style` parameter." |
108 | 124 | ] |
109 | 125 | }, |
110 | 126 | { |
|
114 | 130 | "metadata": {}, |
115 | 131 | "outputs": [], |
116 | 132 | "source": [ |
117 | | - "title = Text(\n", |
| 133 | + "heading = Text(\n", |
118 | 134 | " text=\"Nature themed story\",\n", |
119 | 135 | " style=TextStyles.HEADING,\n", |
120 | 136 | ")\n", |
121 | | - "heading = my_story.add(title)" |
| 137 | + "\n", |
| 138 | + "my_story.add(heading)" |
122 | 139 | ] |
123 | 140 | }, |
124 | 141 | { |
|
204 | 221 | "my_story.add(img, caption = \"Trees with a deer\", alt_text = \"Sequoia trees in the distance\")" |
205 | 222 | ] |
206 | 223 | }, |
| 224 | + { |
| 225 | + "cell_type": "markdown", |
| 226 | + "id": "f5646e7a-15ac-43dd-b18e-4e9192f3d1b7", |
| 227 | + "metadata": {}, |
| 228 | + "source": [ |
| 229 | + "The `Image` class takes either the file path or url to the image as input.\n", |
| 230 | + "\n", |
| 231 | + "Note: The `Image360` class shown below takes _only_ the url as input. " |
| 232 | + ] |
| 233 | + }, |
207 | 234 | { |
208 | 235 | "cell_type": "code", |
209 | 236 | "execution_count": 91, |
|
288 | 315 | "source": [ |
289 | 316 | "### 3. Adding a gallery of images\n", |
290 | 317 | "\n", |
291 | | - "We can expand this concept to add a `Gallery` of Images. You can added up to 12 images to a `Gallery` in a StoryMap. " |
292 | | - ] |
293 | | - }, |
294 | | - { |
295 | | - "cell_type": "code", |
296 | | - "execution_count": 93, |
297 | | - "id": "c05704e0-d601-4664-b47d-e925a09924cc", |
298 | | - "metadata": {}, |
299 | | - "outputs": [], |
300 | | - "source": [ |
301 | | - "gallery = Gallery()" |
| 318 | + "We can expand this concept of adding an `Image` to add a `Gallery` of images.\n", |
| 319 | + "\n", |
| 320 | + "We learned how to create images with the `Image` class. We now create images, and then add them as inputs to the `Gallery` class. You can added up to 12 images to a `Gallery` in a StoryMap. " |
302 | 321 | ] |
303 | 322 | }, |
304 | 323 | { |
|
598 | 617 | "id": "95218931-5a4c-43c7-aa71-fb9ebbc5fe5a", |
599 | 618 | "metadata": {}, |
600 | 619 | "source": [ |
601 | | - "### 6. Add a sidecar with a map and button\n", |
| 620 | + "### 6. Add a `Sidecar` with a `Map` and `Button`\n", |
| 621 | + "\n", |
| 622 | + "Sidecars are a set of slides that combine maps, pictures, videos, web content, and text to help you tell your story. As you go through the slides, the pictures and videos change to match what you are reading, and you can adjust maps in the slides to show different locations and layers.\n", |
| 623 | + "\n", |
| 624 | + "A `Sidecar` is composed of slides. Slides are composed of two sub structures: \n", |
| 625 | + "* a narrative panel and\n", |
| 626 | + "* a media panel.\n", |
| 627 | + "\n", |
| 628 | + "The media panel can be a(n): `Image`, `Image360`, `Video`, `Embed`, `Map`, or `Swipe`. \n", |
| 629 | + "\n", |
| 630 | + "The narrative panel can contain multiple types of content including `Image`, `Image360`, `Video`, `Embed`, `Button`, `Text`, `Map`, and more.\n", |
| 631 | + "\n", |
602 | 632 | "\n", |
603 | 633 | "What sets ArcGIS StoryMaps apart from other web-based authoring tools is the ability to integrate maps with other multimedia elements (words, images, videos, audio, and embedded content). Maps guide readers from place to place, they show change over time, and reveal patterns and relationships. Maps add dimensions to stories that are difficult or impossible to achieve with other media. \n", |
604 | 634 | "\n", |
605 | 635 | "We will add a `Map` to a `Sidecar` along with a `Button` in this section.\n", |
606 | 636 | "\n", |
607 | | - "A `Sidecar` is composed of slides. Slides are composed of two sub structures: a narrative panel and a media panel. The media node can be a(n): `Image`, `Image360`, `Video`, `Embed`, `Map`, or `Swipe`. The narrative panel can contain multiple types of content including `Image`, `Image360`, `Video`, `Embed`, `Button`, `Text`, `Map`, and more." |
| 637 | + "For the example below, we will create a new `Web Map` using the Python API's mapping module. We will add a layer to this map and save it for use in the rest of our storymap." |
608 | 638 | ] |
609 | 639 | }, |
610 | 640 | { |
611 | 641 | "cell_type": "code", |
612 | | - "execution_count": 103, |
| 642 | + "execution_count": 3, |
613 | 643 | "id": "a9e96374-bf6a-4f27-8ba4-31f284475f11", |
614 | 644 | "metadata": {}, |
615 | 645 | "outputs": [], |
|
625 | 655 | ")" |
626 | 656 | ] |
627 | 657 | }, |
| 658 | + { |
| 659 | + "cell_type": "markdown", |
| 660 | + "id": "49ef61ef-5b1e-46f3-8a4b-3f7343261dd4", |
| 661 | + "metadata": {}, |
| 662 | + "source": [ |
| 663 | + "We can now use the Storymap `Map` content class to add our newly created `Web Map` item to the storymap." |
| 664 | + ] |
| 665 | + }, |
628 | 666 | { |
629 | 667 | "cell_type": "code", |
630 | | - "execution_count": 104, |
| 668 | + "execution_count": 4, |
631 | 669 | "id": "0262a0ff-fdd5-4ba9-9d48-a1816fa82a6b", |
632 | 670 | "metadata": {}, |
633 | 671 | "outputs": [], |
|
651 | 689 | "outputs": [], |
652 | 690 | "source": [ |
653 | 691 | "media_panel.set_viewpoint(extent = {'spatialReference': {'latestWkid': 3857, 'wkid': 102100},\n", |
654 | | - " 'xmax': -13038426.89338742,\n", |
655 | | - " 'xmin': -13237372.638884207,\n", |
656 | | - " 'ymax': 4065046.3578961184,\n", |
657 | | - " 'ymin': 3923105.9219285306})" |
| 692 | + " 'xmin': -2357466.358090248,\n", |
| 693 | + " 'ymin': 5398560.851584372,\n", |
| 694 | + " 'xmax': 983749.0223104877,\n", |
| 695 | + " 'ymax': 8333742.73773436})" |
658 | 696 | ] |
659 | 697 | }, |
660 | 698 | { |
|
678 | 716 | " )" |
679 | 717 | ] |
680 | 718 | }, |
| 719 | + { |
| 720 | + "cell_type": "markdown", |
| 721 | + "id": "15161ab6-eadb-40d3-97e1-7bbec5288a9a", |
| 722 | + "metadata": {}, |
| 723 | + "source": [ |
| 724 | + "We have established above that a `Sidecar` is composed of slides, and each `SidecarSlide` is composed of two sub structures: a narrative panel and a media panel.\n", |
| 725 | + "\n", |
| 726 | + "Having defined our inputs above for the media_panel (Map) and navigation_panel (Map), let's now proceed to construct a `Sidecar` with one `SidecarSlide` using the classes from the ArcGIS API for Python." |
| 727 | + ] |
| 728 | + }, |
681 | 729 | { |
682 | 730 | "cell_type": "code", |
683 | 731 | "execution_count": 109, |
|
818 | 866 | "source": [ |
819 | 867 | "### Publish this StoryMap\n", |
820 | 868 | "\n", |
821 | | - "To conclude this guide, we will now publish this story by setting `publish=True` in the `save()` function." |
| 869 | + "To conclude this guide, we will now publish this story by setting `publish=True` in the `save()` function.\n", |
| 870 | + "\n", |
| 871 | + "> Note: While we have demonstrated the process to programmatically [`save()`](https://developers.arcgis.com/python/latest/api-reference/arcgis.apps.storymap.html#arcgis.apps.storymap.story.StoryMap.save) the StoryMap throughout this guide, it is strongly encouraged to view and verify the StoryMap in the UI and publish it there, especially for the first time you publish a StoryMap. " |
822 | 872 | ] |
823 | 873 | }, |
824 | 874 | { |
|
0 commit comments