web maps that don't break when you add layers to service

199
2
12-10-2018 01:23 PM
Status: Open
KevinMacLeod4
Frequent Contributor

If you add layers to a service, they don't show up in web maps. 

We have to remove the service, and redo popups, labels, symbology, scales, etc for any and all sublayers.

Can this be fixed? Especially now that immutable layerIds are in Server... (which was huge)  Why can't it just add any new layers that get added, and remove ones that are gone? And it would be good if schema changes didn't affect it. I hope this can be added once grouping of layers is also added to AGOL in 2019. 

Can anyone comment if this is In Product Plan?

Also this would help my production viewers because I have wired things to reference DOM nodes to auto expand some sublayers inside groups (to overcome design issues of layerlist (no partial checkbox in layerlist) but the _3888 or whatever numer suffix changes when you re-add data. So, if this problem gets fixed, it will prevent a period of downtime in the future when I next have to upgrade. As well as saving time redoing popups, labels, etc.

2 Comments
Lake_Worth_BeachAdmin

you can add the new layers individually via the rest end point url

look for the indexed layer at the end of the URL...

Urltoserver.com/rest/featureserver/

and you can remove layers individually in the web map as well so you don't have to re-do pop-ups. 

KevinMacLeod4

Hi Joe, It will add them as featureLayers that way. For a layer with only a few features, that is the perfect solution and thank you for posting this for everyone.  For 90% of my layers in viewers though featureLayers load too slow and have the max record issue.  Thus I would love to see Esri add the ability to add a /0 sublayer as a dynamic layer exactly because then you could group and re-arrange sublayers into their own groups in a web map. Publish once, use everywhere. While that is the idea of Portal, we will not be using Portal or Pro for a while .  Grouping of sublayers would be very helpful for this reason. They would also make more money on credits I think if this was possible, as then you could re-arrange hosted data layers as well.

note... I do want to say thank you Esri for making the layerIDs so they don't change and can be assigned. I went from 10.2 to 10.61 Server and that feature works great. Now, if webmaps handle service changes it will give us great maintainability. Also, if they make web maps handle service changes I hope they will also be able to handle schema changes to layers in services as well. It seems like whatever JSON web maps create, gets set in stone, until the service is re-added. And I am reluctant to tinker with AGOL Assistant or similar unless necessary until they are not "beta" with "not supported" warnings tacked on. I use Assistant to great effect occasionally, but once they are released for production use I would be glad to use them, but handling service changes should be automatic.