Select to view content in your preferred language

Adding only one feature layer from a Map Image Layer to an AGOL map.

907
2
Jump to solution
03-30-2023 07:58 AM
PeterGreen_CEC
New Contributor II

I have an existing Map Image Layer (MIL) that is hosted on our ArcGIS Server and made available via a Rest service. Within the MIL there are 50+ feature layers which are grouped by theme. My organisation provides a webmap via ArcGIS Online which displays all the layers contained within the MIL. Updates can be made to this MIL (i.e. adding or removing layers) by first updating the database on ArcGIS Server and then republishing the service via ArcGIS Desktop. Updating existing layers is relatively stragithforward, but I now have had to add a new layer to this MIL. We plan to add the new layer to the webmap along with the existing layers. I've succesfully added the new layer to the MIL. When I try to add this new layer to the webmap it seems that I have to add the entire MIL service which contains every single layer. I can’t just add the new layer to the map. I appreciate I could replace the layers in the webmap with the layers in the MIL, but it means going through and resetting all the pop-ups which will be an onerous task. My question is, can I add a single layer from an MIL which contains multiple layers to an existing webmap?

0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi @PeterGreen_CEC ,

If you have a service that you will be adding/removing layers from, it's important to publish the service with Allow assignment of unique numeric IDs for sharing web layers enabled.  This will ensure no applications/web maps will be broken due to a new layer being added to the Map.

You can reference the individual layer by referencing the index value at the end of the URL.  For example, take a look at the following URL:

https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/ACS_Population_by_Race_and_Hispani...

If I wanted to add in only the county layer, I would specify a /1 at the end of the URL:

https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/ACS_Population_by_Race_and_Hispani...

 

View solution in original post

0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi @PeterGreen_CEC ,

If you have a service that you will be adding/removing layers from, it's important to publish the service with Allow assignment of unique numeric IDs for sharing web layers enabled.  This will ensure no applications/web maps will be broken due to a new layer being added to the Map.

You can reference the individual layer by referencing the index value at the end of the URL.  For example, take a look at the following URL:

https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/ACS_Population_by_Race_and_Hispani...

If I wanted to add in only the county layer, I would specify a /1 at the end of the URL:

https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/ACS_Population_by_Race_and_Hispani...

 

0 Kudos
PeterGreen_CEC
New Contributor II

Thank you, Jake. That's worked. Appreciate the response!

0 Kudos