Select to view content in your preferred language

Portal WebMap and updated service

2335
7
06-26-2021 12:25 PM
DavidPike
MVP Notable Contributor

Portal 10.6.1

Map Service  published to federated portal - published from ArcMap (can utilise Pro)

Hi All,

I'm currently having a headache as to how to add a new dataset to an existing service (dataset to be added to an existing group layer in the service) and have it update in the Web Map without having to remove the service, re-add it and then reconfigure all of the popups, aliases, popup display formatting etc previously configured in the Web Map.  This is compounded by the fact that the service is used in multiple Web Maps.

Messing about with the Web Map JSON is a possibility, but not one I'm particularly fond of.  Also would switching to Pro for all publishing solve any issues and allow the full necessary configuration of the Web Map?

Many thanks for any input.

 

7 Replies
TanuHoque
Esri Regular Contributor

@DavidPike 

Do you have static ids assigned to layers/tables in the source mxd?

Here is the link to the help topic to find more info on that: https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/introduction-to-sharing-web-layers.ht...

If not, I'd highly recommend you to do that? It is supported both in ArcGIS Pro and ArcMap.Once you turn this option on, double check to make sure layer/table ids matched with what you have in the service REST end point. In case you see any discrepancies, you can update that in layer/table properties page before updating your map service.

This will make sure once you update your map service with layers, all your webmaps and app will continue to work.

Only thing is that the new layers might not appear in your existing webmaps in some cases e.g. if you reordered sublayers inside the map image layer, or updated their symbology etc. And at that point, you might need to manually insert the new layer definition in the webmap json. That said, I'm not an expert in webmap area, there might be other easier way to do that.

Hope you will find this helpful.

DavidPike
MVP Notable Contributor

Thanks very much for your reply, I'll need to test on this again as there may be some MXDs where this hasn't been employed, hence causing the issue.  Hopefully can figure it out, as re-enabling popups for a large web map isn't my ideal monday.

0 Kudos
DavidPike
MVP Notable Contributor

Hi, Unfortunately after testing it appears that layers added into an existing group layer do not automatically show up even with the layer IDs set.

0 Kudos
TanuHoque
Esri Regular Contributor

@DavidPike 

That is what I meant when I said

Only thing is that the new layers might not appear in your existing webmaps in some cases e.g. if you reordered sublayers inside the map image layer, or updated their symbology etc. And at that point, you might need to manually insert the new layer definition in the webmap json.

If you look at the webmap's json definition on https://ago-assistant.esri.com/, you will see that all sublayers were written in there. I didn't find a way to update that from the UI. What I did was that I inserted the new sublayer in the json manually.

 

 

0 Kudos
DavidPike
MVP Notable Contributor

Thanks Tanu, I'm guessing a manual (unless scripted of-course) process for all the web maps then 😞

ahargreaves_FW
Frequent Contributor

We are stuck with this issue also. Worse still is that messing with the JSON to update a webmap successfully appears to break widgets in WAB templates. 

Perhaps @KellyGerrow , AGOL product owner, can help? Cross postings are here and here.

Kevin_MacLeod
Frequent Contributor

 @KoryKramer old friend, question for you-Can New Map Viewer automatically update and incorporate service schema changes?  Or, is that on the product roadmap?

 

Background...

I have been advocating for this crucial platform issue for 15 years. I learned about the Assistant in JSON back in 2011 or so and began using it, and it helped.  Particulary back when Layer IDs were static.  The problem with apps and webmaps in general has always been, if you change something, stuff breaks. Particularly, schema changes.  Add a domain? Even a domain value? Add a field? Delete a field? You won't see the changes and the service and apps may break.  And how do you know which apps are being used by a service?  Would be great to trace all the way one end of the pipe to another by simply clicking on the feature class in SDE. (Perhaps that would require Portal federation but we have that now, like most places have migrated to)

 

In the early 2010s, after discussion with product managers at Developer Conference over the years, they added unique layers IDs, perhaps around 2014.  That was quite helpful.  No more need to change IDs in Javascript code. Awesome!  (That feature is still off in Pro by default, curiously. I always recommend that be checked on, for any service)

However, there is still the core issue of web map JSON 'fragility'. There should be an optional setting to allow it to poll the service, and automatically add new fields if they are added; basically to sync with the schema. Of course new fields will need configuring but even then, you could have a default setting to simply display the field.  (and to not show fields if they are deleted)  

I have am going to be experimenting with disabling schema locking on services. In theory, if no one is editing that should be fine. And in theory, if I understand this (correct me if wrong!) restarting a service which has schema locking disabled; it will pick up new changes.   So in theory, one could just restart the Arc server in the evening and all services would have new schemas.  In theory. (Anyone have experience or advice there?)

But... the webmap is still locked to the old schema and service parameters. The product enhancement is for Esri is to make the web map JSON more dynamic.   Does New Map Viewer do this?  I have not used it much as it still lacks some features regarding related data and also takes more time and more clicks to use. (similar to experience builder and Pro) And does not do anything new I need that I have seen yet at least.  Nevertheless, if New Map Viewer could automatically pick up schema and service changes that would be a selling point for me.

 

0 Kudos