Labeling and Layers turned off by default

3037
5
07-18-2013 03:33 PM
JeffGodfrey
New Contributor II
I am ArcGIS Server 10.1 and ArcGIS viewer for flex 3.4
What is the best way to accomplish labeling with a map service?  In the web browser the labels do not appear, but in the REST service the labels do appear.
How do I have layers turned off by default, like in a MXD?  I want to make layers available to users, but not have ALL of them on by default when a user accesses the map service in the browser.

Thank you
Jeff Godfrey
Chelan County IT
Tags (2)
0 Kudos
5 Replies
MattiasEkström
Occasional Contributor III
To turn of layers by default you can just turn them of in the MXD and republish the map service.
You can also set visibility in the layer-tag in the main config-file. Use 'visible' for the map service and 'visiblelayers' for sublayers. See
http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag_overview/01m30000000p....
I assume you can make these settings in the Application Builder as well, but I'm not sure since I don't use it.

If your labels appear in the REST service they should appear in the Flexviewer as well. Is it labels you have created in the MXD before publishing the service? How do you look at the REST service when they appear? Through ArcGIS REST Services Directory and "View In:   ArcGIS JavaScript "??
0 Kudos
JeffGodfrey
New Contributor II
Setting the visible setting to false did the trick.  Thanks
Yes, the labeling shows up through the ArcGIS REST Services Directory and "View In: ArcGIS JavaScript, but not through the browser as the users would see it.

Jeff Godfrey
0 Kudos
JeffGodfrey
New Contributor II
And yes, the labeling has been setup in the MXD that I used to publish the map service.

JG
0 Kudos
BjornSvensson
Esri Regular Contributor
In the web browser the labels do not appear, but in the REST service the labels do appear.


Are you adding the service as individual feature layers or as one dynamic/tiled service?  In the latter case, the labels should display as the map image is created on the server.  For individual feature layers, the features are drawn client-side and labelling will not work.
0 Kudos
JeffGodfrey
New Contributor II
Using the entire service, instead of individual layers, worked for most labels.
Although, I have a join on one of my feature classes to a table in SDE, which prevents the labels from showing in the flexviewer.
This is from ESRI:
This is Utkarsh from ESRI Support Services, writing in reference to incident # 1183308 It was pleasure talking to you over phone as discussed you were currently hitting the Following [NIM087311 Map labels do not work in a map service if the feature class resides in an ArcSDE database and is joined to a table.]. The status of the NIM is resolved in the version 10.2. With this information I am marking this incident as closed

Jeff Godfrey
0 Kudos