Bug report- Web AppBuilder legend

829
10
Jump to solution
12-06-2016 04:02 AM
TheoFaull
Occasional Contributor III

Firstly, where is the official bug reporting site? All I can find are dead links from previous discussions.

Anyway, from my MXD I click share as service. This uploads all the layers and their individual symbologies to 'My Content' on my ArcGIS Online account. Integrating this into a Web AppBuilder is relatively simple. The end result is an online map that looks like my original MXD. Great.

However, if I decide to change the order of layers in the MXD's table of contents, then share the map as a service (overwriting the existing one), the legend glitches out on the online map (the Web AppBuilder). Looking down the legend on the online map, the legend is fine up until the first layer where the order has changed.

See below (unaffected layers blacked out. the left shows ArcMap 10.4, and the order I intended for the layers. On the right is the resulting legend in the web map. All jumbled!) nb. this incorrect symbology was not reflected in the map itself, just the legend.

0 Kudos
1 Solution

Accepted Solutions
DerekLaw
Esri Community Moderator

Hi Theo,

> if I decide to change the order of layers in the MXD's table of contents, then share the map as a service (overwriting the existing one), the legend glitches out on the online map (the Web AppBuilder). Looking down the legend on the online map, the legend is fine up until the first layer where the order has changed.

This behavior is expected and by design. When you first publish your map doc as a map service, each layer is given a unique ID. For example, let's say you have a map with 3 layers: A, B, and C. When you publish it as a map service, (going from bottom to top in the TOC) layer A is given layer ID 0, B is given layer ID 1, and C is given layer ID 2. When you create your app in Web AppBuilder and start to configure widgets, the widgets will read and work with the layer IDs assigned in the map service.

If you change the order of your layers in the map doc, then re-publish it, the layer IDs of each layer will also change. So when you re-open the web map in the Web AppBuilder app (built on the previous web map) - the widgets may not display the correct information. You will have to create a new app, which would reference the new layer IDs.

In ArcMap 10.3, we introduced a feature in the Data Frame properties General tab. There is a checkbox "Allow assignment of unique numeric IDs for map service publishing" that will address this "issue". If you check this checkbox BEFORE you publish the map as a map service the first time, then the workflow you describe will be supported.

Hope this helps,

View solution in original post

10 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Theo,

  Your proper channel for reporting bugs is to call esri tech support. GeoNet is not a proper channel for reporting bugs.

TheoFaull
Occasional Contributor III

OK I'll give them a call sometime.

There should really be an online bug reporting site. I swear there used to be.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor
0 Kudos
TheoFaull
Occasional Contributor III

Thanks, I've tried that but:

even when signed in on my company account.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Theo,

  If you are an international user then you have to report bugs through your local esri office.

RebeccaStrauch__GISP
MVP Esteemed Contributor

Or if in the US but not the account administrator, you might not be a authorized to initiate incidents. In that case, you may need to go thru you account administrator. (number of callers is limited based on annual maintenance)

0 Kudos
DerekLaw
Esri Community Moderator

Hi Theo,

> if I decide to change the order of layers in the MXD's table of contents, then share the map as a service (overwriting the existing one), the legend glitches out on the online map (the Web AppBuilder). Looking down the legend on the online map, the legend is fine up until the first layer where the order has changed.

This behavior is expected and by design. When you first publish your map doc as a map service, each layer is given a unique ID. For example, let's say you have a map with 3 layers: A, B, and C. When you publish it as a map service, (going from bottom to top in the TOC) layer A is given layer ID 0, B is given layer ID 1, and C is given layer ID 2. When you create your app in Web AppBuilder and start to configure widgets, the widgets will read and work with the layer IDs assigned in the map service.

If you change the order of your layers in the map doc, then re-publish it, the layer IDs of each layer will also change. So when you re-open the web map in the Web AppBuilder app (built on the previous web map) - the widgets may not display the correct information. You will have to create a new app, which would reference the new layer IDs.

In ArcMap 10.3, we introduced a feature in the Data Frame properties General tab. There is a checkbox "Allow assignment of unique numeric IDs for map service publishing" that will address this "issue". If you check this checkbox BEFORE you publish the map as a map service the first time, then the workflow you describe will be supported.

Hope this helps,

TheoFaull
Occasional Contributor III

Derek Law‌ I tried your suggestion of ticking that check box then publishing the service. However this only made it worse!

All the legend items in the webmap are wrong now. All over the place!

EDIT: phew, luckily unchecking the box, saving the MXD and re-publishing the map restored the orignal legend/symbology/layer order.

Seems like this is a bit of a broken process.

0 Kudos
DerekLaw
Esri Community Moderator

Hi Theo,

You need to check this checkbox BEFORE you publish the map as a map service the first time. Then you have to recreate the web app and re-configure all of your widgets in Web AppBuilder.

Then, if you decide to change the layer order in the map, add new layers, etc. and re-publish the map service - this will not affect how the data layers appear in the web app.

Since you did not have this property checked BEFORE you created your web app originally, it won't work.

Hope this helps,