Adding an individual layer from a REST service to a map on ArcGIS Online

1965
1
Jump to solution
03-01-2017 05:33 PM
DerekHung
New Contributor

Hi,

I'm creating a story map series (in the style of http://storymaps.arcgis.com/en/app-list/map-series/). I need to add maps in each of the tabs. All of the tabs need to retrieve data from the same Map Server from the same REST endpoint (.../rest/services/Sustainability/Sustainability_Map/MapServer), but I need each tab to only show a different set of layers from that Map Server  (see attachment to view what the REST endpoint looks like).

This is my ideal workflow:

1) Create a map for each tab

2) For each map, do "Add Layer from Web", and add the necessary layers by the index on the Map Server

   e.g. For Energy, ".../rest/services/Sustainability/Sustainability_Map/MapServer/1"

   e.g. For Climate Action, ".../rest/services/Sustainability/Sustainability_Map/MapServer/5"

   e.g. For Built Environment, ".../rest/services/Sustainability/Sustainability_Map/MapServer/9"

Each of those indeces (1, 5, 9) have sub-layers (e.g. Under "Energy" (index 1), the sub-layers are Renewable Energy, Municipal Energy Efficiency, Community Energy Efficiency), and these would logically appear as the layers on each tab of my story map.

According to the answer on: https://community.esri.com/thread/36020, this should work! And I do remember being able to add specific layers by just adding the index at the end of the URL a year ago.

However, this is not happening for me now. I get the error "The layer is not a supported type and can not be added to the map." Can somebody please help me?

Thank you!

Derek

0 Kudos
1 Solution

Accepted Solutions
KellyGerrow
Esri Frequent Contributor

Hi Derek,

You are currently trying to add a group of layers as a single feature layer to the map viewer which is not a supported layer type. In order to use the group layer functionality available with map service, you need to add the entire map service and think about removing the unwanted layers from the legend. If you want to add each layer individually, you can do this by going to the layers with features but will loose the group layer functionality, Layer: Renewable Energy (ID: 2) 

-Kelly 

View solution in original post

1 Reply
KellyGerrow
Esri Frequent Contributor

Hi Derek,

You are currently trying to add a group of layers as a single feature layer to the map viewer which is not a supported layer type. In order to use the group layer functionality available with map service, you need to add the entire map service and think about removing the unwanted layers from the legend. If you want to add each layer individually, you can do this by going to the layers with features but will loose the group layer functionality, Layer: Renewable Energy (ID: 2) 

-Kelly