Select to view content in your preferred language

Legend doesn't change after I  alter it in the service (mxd)...

2559
11
01-20-2012 12:18 PM
ShawnCarson
Regular Contributor
I am creating a map and using one of my services. I am having a problem when I change something in the mxd, particulary the legend.

QUESTION:
Is there a way to properly update/refresh any changes I may make to a legend for one of my services? Its not updating properly using the ArcGIS.COm Map Viewer

For example: If I simply change one of the colors in my renderer in my legend (mxd) and re-start my service, the ArcGIS online  (ArcGIS.COm Map Viewer)  is still persisiting the old legend.

THINGS I HAVE TRIED:
I have cleared cache in the browser, that worked one time (??).
Restarted my service
Restarted IIS
I have opened my map in ArcExplorer on-line and that displayed the legend correctly. I then Saved this and then  the legend was properly updated and looking good using ArcGIS.COm Map Viewer (??) in Firefox but not IE.


Any tips would be appreciated, the map itself updates fine and so does the description, its the LEGEND is giving me some issues...

Thank You,

Shawn
Tags (2)
0 Kudos
11 Replies
MikeMinami
Esri Notable Contributor
Shawn,

Legend swatches get cached on the server for older versions of Internet Explorer... The way to clear the cache and regenerate it on arcgis online is to change the order of the layers in your service temporarily, access the service from arcgis online (viewing the legend), then changing the order of your layers back again.

Thanks,

Mike
0 Kudos
ShawnCarson
Regular Contributor
Mike,

Thanks for the reply.  I followed your workflow and that works sometimes and sometime not. Its not always updating. I never got the one color I wanted in my legend. Here are a couple more clues:

IE 7.x
Service created using 9.3.1
Maybe 9.3.1  is the issue?

I tried what you said, (re-ordeing to induce a  a re-creation of the  legend). I even added some layers and created larger legends (unique value, etc) . These updated sometimes and sometimes not. There was no rhyme or reason that I could find. I even deleted the service, SAVED. The re-added my service and the legend change still was not happening.

I only want to change one legend boxes from orange to blue :-)...
0 Kudos
MikeMinami
Esri Notable Contributor
This is a problem that is specific to IE7... Does it work correctly in Firefox? Can you post the URL to your maps service here?

Mike
0 Kudos
roelmartinez
Deactivated User
Map services are cached by the web server for better performance. That cache clears out a a set time interval, sometimes hourly, sometimes daily. New services or changesto services, like changing layer symbology may sometimes take a while to show up because of this. So you have to clear the cache manually, using ArcServer Manager. Usually you can access this from here: http://<your gis server>/ARCGIS/REST/admin. Then login in, and manually clear cache.
0 Kudos
MikeMinami
Esri Notable Contributor
Shawn,

Yes, try clearing your REST endpoint cache after you've updated the service.  FYI, this REST cache updating will happen automatically at ArcGIS Server 10.1 when you republish a service.

Mike
0 Kudos
ShawnCarson
Regular Contributor
Hello,

Clearing my REST cache didn't make a difference. (thanks for this tip though, I confess it wasn't part of my workflow).
I appreciate your input.. Here is more info:


"This is a problem that is specific to IE7... Does it work correctly in Firefox? "
One of my users was seeing the Legend  issue with IE8. And Google Chrome is not updating it either.
Firefox does handle it better, I can usualy get the legend updated.

More confusion:
I got a render looking consistant  in all three browsers.
I accessed my webApp created using an ESRI template and it looked good. I accessed this url from a shortcut on my desktop.
It looked cool.
I accessed the same url from a link on our City's web site.
The legend was wrong in all three browsers.
Maybe its too late in the evening and I am losing it... Not sure.

IE = 7.0.5730
FF = 9.0.1
Chrome = 16.0.912


"Can you post the URL to your maps service here?"
This is the url. I used  one of ESRI's web app's I used with  my map. Let me know if you want the exact url to the map.
http://apps.arcgis.com/hosted/TwoPane/chrome/index.html?webmap=1d309d8e65734737a87f69120688339b

The goal is to change the orange legend to blue. Folks here at the City are super excited about this mapping ability so they will be wanting all kinds of tweaks to it, not sure how I will handle that. We can't upgrade IE as some of our other software (non GIS stuff) has issues with later versions.

Thanks for helping...

Shawn
0 Kudos
roelmartinez
Deactivated User
I couldn't see the map using the url you provided; I got an error message saying "access denied". Did you configure the webmap to share with "everyone"?
0 Kudos
MikeMinami
Esri Notable Contributor
Shawn,

This workflow should fix things.


  1. change the symbology in your MXD and temporarily rename the layer.

  2. Republish your map service from the MXD.

  3. Clear the REST cache (via http://server/ArcGIS/rest/admin)

  4. View your web map and also display the legend in ArcGIS Online in IE7. The legend should look right

  5. Edit your MXD again and rename your layer back to what you want it to be.

  6. Clear the REST cache.

  7. View the map and legend again in ArcGIS Online. Everything should look right.



Wait 30 minutes, and it should look right in other browsers (firefox, chrome, later versions of IE). The reason is that legend swatches returned as MIME are cached on the ArcGIS Online for 30 minutes. IE7 doesn't support MIME and requires a URL to an image, which is why it should work immediately after following the above.

If this doesn't work, you'll need to post the URL to your map service here so we can look at it.

Thanks,

Mike
0 Kudos
ShawnCarson
Regular Contributor
Roel: Forgive me I had re-set my map to private. Its public now.
MikeM: Thanks a million, I will try your workflow.

I really appreciate both your efforts to help me. I will post what happend.

Shawn
0 Kudos