Labels not appearing in published map service

3805
7
Jump to solution
09-11-2014 02:05 PM
ChrisRobinson
New Contributor III

Hi All,

I am about to pull my hair out over what I thought would be a simple task but has turned into something very frustrating.  I have a flex map (flex version 2.3.1) of our zoning districts.  We recently had some zoning district changes where some district were removed and a few were added.  I took this opportunity to update the layer and put it into the local government model schema as well as add a representation to the layer so all departments would be seeing the same symbology.  I updated the underlying mxd on my ArcGIS server (Version 10) and published the service out and checked the map (after clearing my cache in Chrome) and all seemed well. 

I then get a call saying that the zoning layer used to label when you zoomed in to around 1:2500.  I go in an check and I hadn't set up labeling so I set the layer to lable when zoomed in to 1:2500 or closer.  Save the mxd, save an msd and publish the msd.  When viewing the service from within catalog the labels appear.  When I try to view either the orginal flex web map or the service from the rest page in the arcgis.com map the labels do not appear.  I have googled and researched and have come up with a few standard issues to lookout for.

-Make sure the service is set to "dynamic" in the flex main config file and not a "feature" service. I have checked and it is set to "dynamic"

-Use standard fonts which I am using Veranda

As for things I have tried

-Original symbology was using a representation (RuleID and overide), I have since changed the symbology to a catagory field but not luck.

-Label field was a coded domain and displaying a description.  I have since populated the zoning description field with data and tried labeling off of that but no luck.

-This particular server was cloned a few months back (virtual server) and so I went back and tried looking at that MXD on it.  Published the service and viewed within the arcgis.com map viewer from the rest page, the labels showed up. Tthe server had been upgraded to 10.2.1 so I saved a copy of the mxd to version 10 and copied it over to the orginal server, changed the zoning layer to the new layer and republished, no labels.

After everything I try I am clearing my cache in chrome and using an incognito window.  I can't really think of anything else.  Does anyone have any suggestions that I could try? 

Thank you,

Chris

0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Frequent Contributor

Have you tried republishing your service with a totally different name to make sure the .sd file is being refreshed on the server?

View solution in original post

0 Kudos
7 Replies
AnthonyGiles
Frequent Contributor

By what means have you built your flex application? Do you manually edit the config file or have you used the app builder? Can you check your config.xml and make sure that you are looking at your map service and not a individual layer e.g. the url should not have a forward slash number on the end it should end with /MapServer

0 Kudos
ChrisRobinson
New Contributor III

I have manually edited the config file and yes the rest url looking at the map service as the url ends with "mapserver" though there is no slash because I have configured a popup so it looks like this:

<layer label="More Zoning Data" type="dynamic" visible="true" alpha="0.5"

                   url="http://<servername>/ArcGIS/rest/services/Maps/zoning/MapServer">

  <sublayer id="8" popupconfig="popups/PopUp_Zoning.xml"/>

0 Kudos
AnthonyGiles
Frequent Contributor

Have you tried republishing your service with a totally different name to make sure the .sd file is being refreshed on the server?

0 Kudos
ChrisRobinson
New Contributor III

Ah Ha!

I forgot the number 1 rule when it comes to working in the IT department, have you restarted you computer/server yet.........

I did as you suggested and saved an msd called zoning1 and published it to the server, cleared my cache and opened an icognito window, went to the rest services page and noticed the service was not listed.  It then dawned on me that I hadn't restarted the server after any of these changes (this seems to be an issues, for us at least, with version 10 and prior.  Since most of our server are 10.2 or higher this doesn't seem to be as much of an issue as any new services seem to show in the rest services page instantly, 10 usually requires us to reboot then they appear.  Has anyone else noticed this?

Needless to say after a reboot my labels are showing on the orginal service in the flex app and the arcigs.com.

Thank you for your help Anthony

0 Kudos
AnthonyGiles
Frequent Contributor

Using server 10 and earlier versions you need to clear your rest cache manually through the rest admin page, if you update services:

REST API Admin

doing this will stop you having to reboot your server

ChrisRobinson
New Contributor III

Thanks again Anthony,

I had to make another change to the map and tried this method versus restarting the server and it worked.

0 Kudos
BlytheSpendlove
Occasional Contributor

Hi Chris,

When you say....

"Make sure the service is set to "dynamic" in the flex main config file and not a "feature" service."

...why can't the layer be a feature service? 

I am trying to add labeling to a feature service and the map service version of it shows the labels but not the feature service. Is there some  limitation with the feature services and labeling?

Thanks!!

Blythe

0 Kudos