Published on GEOG 865: Cloud GIS (https://www.e-education.psu.edu/geog865)

Home > Lessons > Lesson 7: Web maps and data as services using ArcGIS Online

Lesson 7: Web maps and data as services using ArcGIS Online

Overview

In this lesson, we begin exploring Esri's offering of SaaS cloud resources, ArcGIS Online. In review, SaaS represents the end of the cloud spectrum where more components of a system are handled by the service provider and the user is responsible for none of the hardware, software and data infrastructure. In most SaaS cases, all client interaction occurs via a Web browser, which ideally offers a user-friendly and rapid development experience.

In this lesson, you will use ArcGIS Online to assemble and share online maps that combine various web services. You'll also see how you can upload your own data to ArcGIS Online and have it run as a live web service similar to the services you published with ArcGIS Server.

Objectives

At the successful completion of this lesson, you should be able to:

  • understand the role of ArcGIS Online;
  • create an application for sharing maps using ArcGIS Online; and
  • upload data to ArcGIS Online and access it as a web service.

Deliverables

  • Complete: L07: Assignment
  • Participate: L07: Discussion

ArcGIS Online and its services

The definition of SaaS suggests that all components of a computing system are provided and managed by the cloud service provider, freeing the client to focus only on utilizing or consuming the resources. ArcGIS Online is an example of this level of service. As you observed in Lesson 2, ArcGIS Online can be used as a canvas for creating web map mashups, combining services from multiple sources. You'll do some more of this in this lesson. But you'll also go a bit further and see how ArcGIS Online can be used as a hosting site for your own web services and applications.

Hosting services on ArcGIS Online

ArcGIS Online can host web services in very much the way that ArcGIS Server can host web services. This means that you can make a map in ArcMap, choose File > Share As > Service like you have always done, and choose to host the service using ArcGIS Online servers instead of your own ArcGIS Server. In fact, there are other entry points into publishing a service that don't require ArcMap, such as uploading a CSV file or a shapefile and publishing it.

Because Esri is marketing ArcGIS Online to individuals and groups who may not be familiar with ArcGIS Server or GIS technical parlance, they don't use the term web services in the ArcGIS Online documentation; instead, they use the term "hosted web layers". Nevertheless, these hosted web layers use the same Esri GeoServices [1] specification that is used by ArcGIS Server services. Therefore, code you write to interact with these services looks very similar to code you would write for ArcGIS Server.

Hosting web layers in ArcGIS Online costs money. You buy a block of "credits" from Esri, and these credits are consumed as you consume various resources in ArcGIS Online, such as uploading data and hosting services. The Service Credits Overview [2] page shows the cost in credits for various actions.

The types of web layers that ArcGIS Online can host are limited compared with ArcGIS Server. Originally, ArcGIS Online could only host (rasterized) tiled map services and feature services. Recently, layers for supporting 3D views have been added (scene layers and elevation layers). Vector tile layers are also new and can only be published through ArcGIS Pro.

There are several workflows you can take to prepare hosted layers, depending how much GIS software you have installed onsite. A good example is with rasterized tiles. You can optionally build the cache tiles using ArcGIS Online (which costs credits) or you can build them yourself in ArcGIS Desktop and upload them as a "tile package" to ArcGIS Online where they can reside as a hosted layer (which saves credits but takes more work). See the article "Workflows for building and hosting cached map tiles in ArcGIS" [3] for a comparison of options for building rasterized tile layers in ArcGIS Online.

Field data collection workflows

Esri has developed a number of apps for getting data into ArcGIS Online and viewing it once it is there. One of the most widely used is Collector for ArcGIS, which is used for data collection in the field, sometimes in disconnected environments. You install Collector on smartphones or tablets from the device's app store. When you open up Collector, you connect to a web map that you've saved on ArcGIS Online. You can then download base map data to your device so that you maintain geographic context if or when you become disconnected from the Internet while gathering data.

When you go out into the field, Collector uses your device's GPS to place you on the map. You can then take data points at any location and optionally supply attributes and/or attach a photo from the device's camera. When you return to a connected environment, you can "sync" the device's data into your ArcGIS Online service, where it is then available to other client applications.

Other apps such as the Esri Operations Dashboard are used for visualizing data from ArcGIS Online, whether it was put there by Collector or other means. This video series from the Esri Federal User Conference shows how Collector, ArcGIS Online, and the Operations Dashboard can work together in real time. Although this demonstration was conducted several years ago early in Collector's history, it does a nice job of showing the fundamental purpose of the app and how it can be used for data acquisition in the field.

  • Operation Gold: The Operations Dashboard and Collector App for ArcGIS [4]
  • Operation Gold 2: The Operations Dashboard and Collector App for ArcGIS [5]

As you will see on You Tube's "Up Next" list, there are a number of follow-up videos in this Operation Gold series that you can continue watching to see how the data is used further down the line after it is collected.

A platform as a service

When you were viewing the credit cost page, perhaps you noticed that ArcGIS Online offers geocoding and place finding services (which are free up to a point), as well as things like routing and network analysis services. Along with the ability to create mashups from third-party services, these capabilities may conceptually shift ArcGIS Online out of the SaaS category and toward the PaaS category, as the data component becomes more managed and handled by the client. This is perhaps a purely philosophical conversation rather than a practical one, but given the breadth of functionality provided by ArcGIS Online, its users may consider it to fall within SaaS or PaaS depending on the specific manner in which the site is used.

Running it on premises

Esri has recently productized a version of ArcGIS Online that can be run on premises, named Portal for ArcGIS. This is aimed at organizations that are disconnected from the Internet (such as the intelligence community), organizations that need a higher SLA (uptime percentage) than ArcGIS Online can offer, or organizations that simply do not feel comfortable moving to the cloud yet.

Portal for ArcGIS looks and feels the same as ArcGIS Online, but uses ArcGIS Server on the back end for hosting any services published by portal users. The administrator of Portal for ArcGIS is responsible for making sure the portal and server have enough hardware to accommodate requests and uploads by portal users. You will learn more about Portal for ArcGIS in Lesson 9.

Exploring the ArcGIS.com website

The ArcGIS.com website provides a view into ArcGIS Online. Sometimes you might hear the terms ArcGIS.com and ArcGIS Online used interchangeably, but ArcGIS Online can be accessed through other Esri clients such as ArcMap and programmatically through any client using the ArcGIS REST API [6].

Take a tour of the ArcGIS.com website using the steps below.

  1. Open your Web browser to the following URL: arcgis.com [7] and log in using the Penn State Enterprise account you used in Lesson 2. ArcGIS Online is a cloud-based resource for viewing existing maps, creating new map products, and sharing maps with others. In ArcGIS Online, data services are presented in their map form, and the process of creating new maps and editing features is performed in a map interface.
    The tabs across the top of the ArcGIS Online home page correspond to the site's primary capabilities:
    • Gallery - view existing maps
    • Map - create new map products
    • Scene - create new 3D map products
    • Notebook - analyze data with Python
    • Groups - share your maps with particular users or the public (shown when logged in)
    • Content - manage map content that you have created (shown when logged in)
    • Organization - manage users and other settings for the Organization to which your account belongs (shown when logged in)
  2. Browse some maps by clicking Content and clicking the Living Atlas tab. Choose one of the categories on the left, and click through some of the map thumbnails listed on the Gallery page. There are two primary kinds of things you can open here: maps, and apps. These represent products created by ArcGIS Online users and published for public access. Think of a web map as your working canvas for assembling a bunch of web services into a presentable view that can then be pulled into many different APIs or platforms. A web mapping application, in contrast, is a final view that is created with a single API and is hosted for consumption by end users only. We're going to focus on web maps right now, but in the next section of the lesson, you'll get a chance to make both a web map and a finished web mapping application.
     
  3. Choose a web map (try searching for Active Hurricanes, Cyclones and Typhoons), and click its hyperlinked title to open the Overview page. Please note the Layers section toward the bottom of the page. This section lists the source of each data layer included in the published map. You should observe that each layer specifies a URL, which corresponds to the internet map server from which this particular data service is published. The URL should indicate the host (e.g., services.arcgisonline.com) and type (ArcGIS Server, WMS) of the service.
  4. Now, click the Open (or Open in Map Viewer) link on the web map, and open it in the ArcGIS.com map viewer. Use the tabs on the left hand menu to explore the layer list and legend.

Think about how the physical location of the source data, the manner in which you are using it, and extent to which all of this is transparent to you fits the SaaS model of cloud computing. Have the underlying technical details of how and where the data are published been adequately hidden from you? You've seen that you can discover some of that information, via the services directory, but it isn't always necessary to know it, when using the client provided by ArcGIS Online.

This site is an example of a SaaS resource because all components of the infrastructure are managed by the cloud, from the underlying hardware and operating system, to the software and data. In fact, user-created maps in the ArcGIS Online Gallery are primarily generated by compiling and overlaying existing map layers already published to ArcGIS Online or other mapping servers. It is possible to create new data in this environment by drawing features as graphics (Add > Sketch Layer). But this is the extent to which data can be directly managed; the ArcGIS Online cloud manages the underlying data storage details.

Constructing a web map from different services

In this exercise, we will create a new web map using the ArcGIS Online map viewer.  The SaaS service model specifically enables access to resources from a thin client (e.g., Web browser) and conceals the underlying cloud infrastructure, including network, servers, operating systems, and storage. The following example of building a map in ArcGIS Online takes this service model one step further by integrating not just the services of one cloud computing infrastructure (Esri), but also the underlying infrastructures of other cloud services as well (US Census Bureau, NOAA). You'll see how ArcGIS Server services can be mixed with other types of services, such as WMS, during this process.

Let's take this opportunity to review the Essential Characteristics of Cloud Computing and identify how services like ArcGIS Online achieve them:

  • On-Demand self-service. Cloud computing resources should be accessible anytime and without the need for human interaction with the service provider. Like most websites, ArcGIS Online is accessible via a browser 24/7 without the need to request permission.
  • Broad network access. The capabilities of ArcGIS Online are accessible from any location via the Internet, using ubiquitous clients, such as Web browsers.
  • Resource Pooling, Rapid Elasticity and Measured Service. These characteristics are hidden from the client in a SaaS service model. In the case of ArcGIS Online, the allocation of resources to client requests is performed automatically by the underlying cloud infrastructure without knowledge of the user. This characteristic is of particular relevance to map services, like those you created using ArcGIS Server. The configuration of every map service specifies the maximum number of instances that service can instantiate. If multiple users request a service concurrently, additional instances can be generated to handle the simultaneous requests. If the server architecture includes multiple physical or virtual servers, map service instances can be created and destroyed on any of the available servers in a way that balances the processing load. This occurs automatically without any human interaction in the client or server.

To illustrate the flexibility and interoperability of cloud GIS, we will consume three map services from various service providers via different protocols (Esri GeoServices REST Specification and WMS). You can then add more services to this map if you wish, including any services you have published in earlier exercises. For now, let’s consume an Esri basemap service via REST, a glaciers layer via WMS, and a snow depth layer via REST. We’ll imagine that we are planning a hiking trip in Mount Rainier National Park, and we want to get an understanding of conditions.

First, download the data for this lesson [8]. Then, do the following:

  1. Open arcgis.com in your web browser, and log in using your Penn State Enterprise account that you created previously in this course.
  2. Click Map.
  3. Click Basemap, and select Dark Gray Canvas.
    When you consume a map service, you often don’t get much control over the symbology, other than the transparency level. The layers we’re going to consume are lightly colored, so we’ll use the dark basemap. This particular basemap also tends to mute out most layers and this is a good thing for our map; it will keep things uncluttered.
    Let’s start by adding a map served through the WMS (Web Map Service) specification. WMS is a vendor-neutral set of request and response syntax specifications defined by the Open Geospatial Consortium (OGC) for serving rasterized map images drawn on demand. Many government organizations (especially in Europe) make their web services available through WMS.
  4. Open a new web browser page or tab, and browse the WMS services made available through the US Census Bureau TIGERweb [9] We’ll add the one for Physical Features, so take note of that one’s URL.
  5. In your arcgis.com map viewer, click Add > OGC WMS web service.
  6. Enter the URL, which should be something like, https://tigerweb.geo.census.gov/arcgis/services/TIGERweb/tigerWMS_Physic... [10]

    Interestingly, you will often see “arcgis” in the URL of WMS services. This just means that the organization is using ArcGIS Server to power the service, but they have checked a box in the software to make the service available through the WMS specification in addition to Esri’s GeoServices specification. The back end data doesn’t change: just the way that it is requested and returned.
  7. You may also need to add "WMSServer" to the end of the URL to indicate that you want to consume the service using that protocol instead of REST.
  8. Click Add To Map and wait a minute for the layer to appear on the map. It may take a few seconds to draw. Remember that this service is being drawn at the time you request it; it is not cached. Don’t zoom and pan around while you are waiting, as this will generate more requests and hold up the server even more.
    If you don’t see anything at first, zoom in to a more local scale.
  9. In the left hand Layer list, expand the WMS Service you added. Notice all the layers available and that some are only visible at certain scales. We’re just going to use this service to view glacier coverage.
  10. Turn off all layers except Glaciers and its parent node Hydrography.
  11. Zoom to the Mount Rainier area in central Washington state. Use the search box if you need to.
    You should be seeing various glaciers covering the mountain.
     
    Glacier layer over Mount Rainier
    Figure 7.1: Glacier layer over Mount Ranier
    Now, let’s add a current snow depth layer to understand where we might encounter snow in addition to the glaciers we’ve already viewed. This time, we'll consume the service via ESRI REST, rather than WMS.
  12. Open a new tab or window in a web browser and examine this ArcGIS Services Directory metadata page for a snow analysis service made available through the National Weather Service [11]: 
  13. In the arcgis.com map viewer, click Add > Web Service, and enter the NWS URL for the ArcGIS Services Directory page above.
  14. Click the Layer list button or the Properties button to examine the snow depth layer and to learn more about the color ramp symbology.
  15. Make the snow analysis layer somewhat transparent by clicking the Properties button and scrolling down to the Transparency section. You want to make it transparent enough that you can see the glaciers beneath.
     
    Glaciers with snow analysis layer overlay
    Figure 7.2: Glaciers with snow analysis layer overlay
  16. Save your map as Hiking Conditions.

You just assembled a web map by combining web services from multiple sources. In the next section of the lesson, you'll add in some of your own data.

Adding your own data to an ArcGIS Online web map

So far, we’ve brought in web services from a few different servers in order to get a multidimensional picture of conditions around Mount Rainier. In many cases, you might want to add your own data to supplement whatever web services you find. Suppose you’re going to be hiking on a section of the Wonderland Trail, which encircles Mount Rainier. Let’s add this trail to our map by uploading a shapefile directly to our map in ArcGIS Online. This dataset was adapted from a file geodatabase feature class downloaded from the Washington State Recreation and Conservation Office public download page [12].

The functionality to add a shapefile directly from a .zip file is not yet supported in the new (current) version of the ArcGIS Online Map Viewer, so to perform this function we need to temporarily switch back to the Map Viewer Classic.

  1. In arcgis.com, open your Hiking Conditions map from the previous section of the lesson.
  2. If you haven't already, Save your map before proceeding.
  3. Click the Classic Map Viewer link at the upper-right of the window to change to the previous version of the Viewer, which supports the ability to add data directly from a file.
  4. Click Add > Add Layer From File.
  5. Browse to wonderland.zip, select the Keep Original Features option, and click Import Layer. Notice all the different data formats you can import.
    This is just a zipped shapefile. After the layer imports, you’ll be prompted to define the symbol. You can style the layer based on some attribute or just define a single symbol to be used.
  6. From the Choose an attribute to show dropdown, choose Show location only.
  7. In the Select a drawing style area, click the Options button and choose to symbolize your trail using a thick brightly colored line. Then click Done or OK to save your changes.
    Your map will look sort of like this, although it will probably have more snow on it.
     
    Map with trail
    Figure 7.3: Map with trail
  8. Save your web map again.

Your data is saved inside the web map rather than being published as a regular, individual layer in your ArcGIS Online content. This works fine for small datasets that need to be used on a limited basis. However, there may be other situations where you want the data to be available to multiple web maps, or at multiple offices. In such a situation, you can publish the data as a service running directly on ArcGIS Online (with no ArcGIS Server needed). We will do this in the next section of the lesson.

Publishing your data as a hosted service on ArcGIS Online

When you saved your map in the previous section of the lesson, your trail features got saved with it. If you want your uploaded dataset to be accessible outside the map as a service to anyone who uses your ArcGIS Online organization, or the public in general, you must publish it separately as a “hosted feature service”. Let’s do that with a different shapefile.

Switch your mentality now to that of a park ranger who wants to share information with co-workers deployed in other stations around the park. You have a point dataset representing maintenance issues reported on the trail. You want your colleagues to be able to load this whenever they’re logged in to your organization.

Change Style icon
  1. In arcgis.com, open your Hiking Conditions map from the previous section of the lesson.
  2. In the upper left of your map, click Home > Content.
  3. Click New Item > Your Device.
  4. Click Browse, and select the trail_issues.zip file included with this lesson’s data. This is a zipped point shapefile with a few points in it.
  5. Complete the Item from my computer dialog box, being sure to select the option to Publish this file as a hosted layer, and click Next to give your layer a name and save it to your ArcGIS Online content.
  6. When your service has finished publishing, examine the overview page that appears for your new trail_issues service.
  7. Click the Settings tab, and note that you can control editing and export functionality on this service.
  8. Click the Share button on the Overview page, and note that you can open access to the public or just people within your ArcGIS Online organization. Check the box for the organization, but not for the public (we don’t want the public to stumble across this practice service and think there are real issues on the trail).
  9. At the bottom of the Overview page, notice the Service URL. Clicking the View button will open the Services Directory page for your service where you can see that it is a bona fide feature service like the ones you’ve worked with elsewhere in this course. The URL has a token appended to it that shows you have entered the requisite ArcGIS Online credentials for viewing this service (i.e., you are logged in to your account).

    Think about security for a minute. There are a variety of situations where you’d want to make this service public, and other situations where you’d only want it visible within your organization. If you make this service private to your organization, it won’t be visible in any web map that you share with the public.

    In some cases, you might want to make the service publicly visible, but only allow internal people to edit it. Esri provides for this with something called feature layer views [13].
  10. Let’s move ahead now and add this service to our web map.
     
  11. Copy the URL up to and including the FeatureService part (so that it looks something like https://services8.arcgis.com/ju9hg9bDFqOUZxHa/arcgis/rest/services/trail... [14])
    1. Remember to specify your customized "trail_issues" service title.
  12. Return to your Hiking Conditions web map, and click Add > Web Service and paste the URL to your trail_issues feature service.
  13. Your trail_issues layer should appear symbolized by the default dots. Let’s symbolize it based on whether the issue has been resolved or not.
  14. Use the Properties pane for this layer to change the color and/or symbol for the issues points and save your changes.
  15. Experiement with any other options for layer symbology or funcationality, and when your web map looks awesome, go ahead and save it.

Sharing your work in a web app

We've done quite a bit of work in this walkthrough to construct a useful and nice looking web map with intuitive layer names and pop-ups. As a final step, it will be helpful for you to practice pulling this web map into an app. We'll do this using ArcGIS Online templates, a slightly different way from Lesson 3 that doesn't require the Web AppBuilder.

  1. Open a web browser, and log into arcgis.com as you did earlier.
  2. Open your Content page, and click Create App > Instant Apps.
  3. Choose the Basic template.
  4. Type a title, tags, and description, and click Done. The title can be something like Trail Monitoring App.
    Now you have a chance to pull in your web map you just made.
  5. Choose your Hiking Conditions map to display in the app.
    Now you get all kinds of options for configuring this web app, similar to what you saw in the Web AppBuilder, although perhaps not as extensive.
  6. Experiment with the settings until you get a web app that you're happy with.
  7. Publish and Launch your app.
  8. Continue refining your map and app until you're happy with how things look and behave.

Assignment: Considerations for designing web maps

Because we didn't make the trail issues feature service public, I am not confident that I will be able to view your web maps live. Therefore, I want you to take a series of screen captures demonstrating this app. I also have some questions for you to reflect on.

Please create a new document and insert the following things:

  • A screen capture of the initial view of your web app.
  • A screen capture of your web app zoomed in so that the glaciers, snow cover, hiking trail, and trail issues layers are visible.
  • A paragraph describing some ways that you might use ArcGIS Online tools to bring together multiple services in some real world context other than hiking and outdoor recreation planning.
  • A paragraph commenting on which parts of the design phase you can control when you are making a web app like this, and which phases you cannot control. Think about layer names, symbology, styling, and service reliability and uptime. How does this affect your approach to creating or using web mashups?

Cloud Computing Discussion: Practical Considerations and Cloud Vendors

This week's assignment is a little different, involving a bit less reading and a bit more research. I would like each of you to identify a cloud computing product and produce a short report. Please tell us:

1. Who is offering it

2. What essential cloud characteristics it exemplifies (remember NO-REM: Network availability, On-demand access, Resource pooling, Elasticity, Metered service), and

3. Which cloud service models (or mix of models) the product uses. Recall that these include Saas (Software as a Service), PaaS (Platform as a Service), and IaaS (Infrastructure as a Service).

4. Please comment on the services' suitability for GIS use. A GIS consists of a spatial data store, spatial data analysis, and spatial visualization (or mapping).

5. Finally, see if you can apply the concepts of SLAs and measuring operations to these providers. If you can, please explain how they apply, if not, then explain why not.

You must choose a cloud computing product that no one else is doing. So, if you are concerned that someone else might be interested in the same product, please post a short note when you have picked a product that identifies it as yours ("I'm reviewing XYZ.cloud.com" or something similar).

If you want to comment on other people's reviews, that would be good, and would help you if you had any deficiencies in your review. However, commenting on other people's reviews is not needed for full credit (unlike in other weeks).

If you have purchased the optional textbook, the chapter "Practical considerations" from The Cloud at Your Service may help you think of some discussion points.

Here's a list of cloud products to choose from if you don't have one in mind: ArcGIS Online, Mapbox, GIS Cloud, CARTO, Amazon EC2, Microsoft Azure, Google Maps, Google Earth, Heroku, CloudBees, Google AppEngine, GMail, Dropbox, OpenStreetMap, GitHub, SourceForge.

Deliverables for this week's cloud discussion:

  1. Pick a cloud service and review it based on the required points above.
  2. You must pick a service that no one else is reviewing.

Source URL: https://www.e-education.psu.edu/geog865/node/37

Links
[1] http://geoservices.github.io/
[2] http://www.esri.com/software/arcgis/arcgisonline/credits
[3] http://blogs.esri.com/esri/arcgis/2013/02/06/workflows-for-building-and-hosting-cached-map-tiles-in-arcgis/
[4] https://www.youtube.com/watch?v=jo6x1dfalFM
[5] https://www.youtube.com/watch?v=Or1QQ_lW00c&t=208s
[6] https://developers.arcgis.com/rest/
[7] http://www.arcgis.com/home/index.html
[8] https://www.e-education.psu.edu/geog865/sites/www.e-education.psu.edu.geog865/files/data/arcgis_online_map_lesson_data.zip
[9] https://tigerweb.geo.census.gov/tigerwebmain/tigerweb_wms.html
[10] https://tigerweb.geo.census.gov/arcgis/services/TIGERweb/tigerWMS_PhysicalFeatures/MapServer/WMSServer
[11] https://idpgis.ncep.noaa.gov/arcgis/rest/services/NWS_Observations/NOHRSC_Snow_Analysis/MapServer
[12] https://rco.wa.gov/
[13] http://doc.arcgis.com/en/arcgis-online/share-maps/create-hosted-views.htm
[14] https://services8.arcgis.com/ju9hg9bDFqOUZxHa/arcgis/rest/services/trail_issues/FeatureServer