Overview

You will learn: how to quickly change the sharing settings for your layers.

You can share layers, maps, and other items saved in your ArcGIS for Developers account with the public, with your organization, with a group, or just keep them private. Until actively shared, items are not visible to others and do not appear in search results. When users and applications attempt to access private items, they will be required to provide authentication. Public items do not require authentication however and are accessible to everyone. Developers should keep in mind that an item's sharing settings will impact any apps consuming that item. For example, if you have an app that's using a web map, and the web map or one of its layers are set to 'private', the app will not display the map or the layers that are private.

In this lab, you'll set the sharing settings for layers in a map. You can learn more about sharing your layers and using groups by accessing ArcGIS Online documentation.

Before you begin

If you don't have a map or layer in your account, complete the Import Data, Create a new dataset, or Create a webmap lab before beginning this exercise.

Steps

  1. Sign into ArcGIS for Developers.

  2. In the top nav, click on Dashboard.

Set a layer to private

  1. Click on one of your layers > Share and uncheck all sharing options.

Add the layer to a map

Maps can be public but the layers it contains can be private and require authentication.

  1. In your Dashboard, click one of your private layers.

  2. In the item on the right, click Open in Map Viewer.

  3. In the Map Viewer, click Save and save the map.

  4. Click Share and share the map with Everyone.

Access the web map with a private layer

  1. In your web browser, copy and change the url for the map so it can be accessed publicly. For example:

    https://[your_account].maps.arcgis.com/home/webmap/viewer.html?webmap=[your_webmap_id]
    

    to

    https://www.arcgis.com/home/webmap/viewer.html?webmap=[your_webmap_id]
    
  2. Sign out of ArcGIS Online and ArcGIS for Developers.

  3. Paste in the url below (with your web map id) and then navigate to the map. The Map Viewer will detect the private layer and require you to login. If you are the owner and you login with your credentials, you will see the map and layer. If another user logs in, they will still be able to see the map and basemap because they are public, but the private layer will not be accessible.

    https://www.arcgis.com/home/webmap/viewer.html?webmap=[your_webmap_id]
    

Congratulations, you're done!

You map should look and behave like this.

Challenge

Create a group and share items

Go to your ArcGIS Online account and create a group. Select some of your private maps and layers and share them with that group. Now add other users to the group and ask them to try to access your maps and layers.