Can't change legend in Basic Viewer

4552
19
06-05-2015 07:19 AM
Zihan_Lin
New Contributor III

I used Basic Viewer for my app, and noticed that the I can't change Legend name.

Capture.JPG

The line in bold is the service name when I publish a service using ArcServer,

the second line "Malawi Deforestation Degradation Hotspots" is the layer name of my original map.

How can I turn off one any one of them?

0 Kudos
19 Replies
JeffWard
Occasional Contributor III

I have also found that publishing a layer that I need to interact with - have a popup displayed, or edit - I will publish that feature class as a feature service all by itself on ArcGIS Online or ArcGIS Server.

Jeff Ward
Summit County, Utah
0 Kudos
KellyGerrow
Esri Frequent Contributor

Hello,

Can you share\Private Message your webmap or service URL that you are experiencing issues with?

If you are adding a Map Service URL, http://sampleserver6.arcgisonline.com/arcgis/rest/services/CommercialDamageAssessment/MapServer,

then the name of the map service and the feature layer will appear in the table of Contents. If you add the feature layer directly, http://sampleserver6.arcgisonline.com/arcgis/rest/services/CommercialDamageAssessment/MapServer/0​, then there will only be one feature layer in the contents.

Thanks,

Kelly

0 Kudos
EmmaGause
New Contributor II

I am having the same problem. Has this issue been remedied?


I uploaded a shapefile (zipped) from ArcGIS Desktop into "My Content" on ArcGIS Online. I used this same shapefile for many different maps. In the Web Viewer, I clicked "Change Style" and then selected different attributes to display using "Counts and Amounts (Color)". In the legend, both the layer name AND the attribute name show up so that there are two titles for the layer. (This does not happen when I choose "Location (Single Symbol)" and do not select an attribute to display).

The same two titles show up in the web apps that I create from these maps. I would like to only show the layer name and NOT the attribute name.

Any suggestions?

0 Kudos
by Anonymous User
Not applicable

This has always been something that has bothered me as in most cases you don't need what appears to the user to be two layer names. It usually looks cleaner having just one heading. For years I have simply removed the field name heading in the mxd which is driving the map symbology. Simply click in the highlighted text rename or remove all together. Not the best example, but in this case you can remove "Diameter" then publish as only "Gravity Main" then your symbology nested below it.

If you get a refreshed TOC view or close and reopen your mxd you will still have the symbology, however it won't list the field name in the heading. Your symbology will be directly below your one and only layer name.

This would carry over into ArcGIS Online with no issues...until now (lovely). Just in the last few months this appears to no longer be working. Every time I bring a hosted feature service into ArcGIS Online it prompts me for symbology setup. Even if I click "cancel" it still seems to automatically list the field name in my layer heading that my symbology is based upon which is not what I want. In a lot of cases the field names aren't intuitive or clean looking to non-GIS users (ex. underscores, abbreviations, etc.)

 

I haven't done extensive testing, but Pro doesn't seem to even allow you to delete the field name from the layer heading at all. Regardless, the results are the same in ArcGIS Online. I have layers I published back in August which don't prompt me with the above screen when I pull them into a map, they simply accept the symbology and layer names as it which is what I want. I am guessing this is tied to a recent ArcGIS Online update.

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hey Jared,

Are you looking to change the Layer Name in the Legend or Alias's for the field name?

You will be prompted to set up your symbology if it hasn't been saved on initial load of the web map, once it's set in the web map, you won't be prompted further. Is the title you desire Gravity Main? If so, go ahead and select Done for the change style option and then select the rename option to change the title of the layer. This will be reflected in the Legend of the web map:

-Kelly

0 Kudos
by Anonymous User
Not applicable

Hi Kelly,

I wasn't trying to rename the layer itself, though often times I do, in this case I was trying to remove the sub layer name which is the field name driving the map symbology. Not the best example as this one is pretty straightforward, but in this case removing "Diameter" all together:

In the past, say even a few months ago, I could remove this in the mxd then publish and the layer structure would look the same when pulled into AGOL which is what I wanted. Now it seems to behave where no matter what ArcGIS Online detects and adds my field name back into the structure of the layer in the TOC and legend which is not ideal. Often times the field names in GIS aren't intuitive to non-GIS users or are redundant like in the original poster's example. In that case I would want to remove the field name heading as it is already stated in the main layer name.

After my previous post I did notice that after configuring my pop-ups and changing the text for the field name (the one driving the map symbology) it also changed in my TOC and legend. I haven't noticed that before, but at least that would be a way to clean up the field name heading (e.g. replace underscores with spaces). I think it would still be useful to fully remove reference to the field name heading when desired.

Jared

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi Jared,

Are you publishing this service as a hosted feature service in ArcGIS Online or as a Map Service on ArcGIS Server? Due to the issue that you are seeing, I think you are publishing a map service. If you aren't using any of the dynamic map properties, try adding the layer at the layer level

https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0

Vs. 

https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer 

to remove the extra reference to the Service and layer in the web map.

-Kelly

0 Kudos
by Anonymous User
Not applicable

Kelly,

I am publishing a hosted feature service in ArcGIS Online. My apologies if I left that off the details.

Jared

0 Kudos
KellyGerrow
Esri Frequent Contributor

Are you able to share the web map?

If it's private, feel free to invite my username to a group, Karate_Kelly

-Kelly 

0 Kudos
by Anonymous User
Not applicable

I don't have an example off hand at the moment. The question is (anyone can test using any hosted feature service):

- for any ArcGIS Online hosted feature service is there a way to completely remove the sub layer name in the heading. This is the field name which is driving the map symbology.

So in my example remove "Diameter" all together. In the original posters example remove the second "Malawi Deforestation Degradation Hotspots" text. In other words, the main layer name will include any and all information the user needs.

In the past removing the field name in ArcMap (see my previous posts) then publishing did just that. Now that no longer works and I am wondering if that is due to a recent update. 

I did find out that renaming the field name which is driving your map symbology in your pop-up configuration is a way to at least clean up the text some (i.e. remove underscores etc). But again, in some cases the second reference to the field name is completely redundant and it would be ideal to be able to remove all together --> original posters example.

0 Kudos