Hide the map label on the web app building,

4361
11
Jump to solution
09-30-2015 04:04 AM
MajdoleenO_A__Awadallah
Occasional Contributor III

Hide the map label on the web app building,

I am wondering if there is a way to hide the label on a map service at the level of web map builder manager?

Clip_249.jpg

Best,

Majdoleen

0 Kudos
1 Solution

Accepted Solutions
RyanGatchell2
New Contributor III

You may be able to bring in this service as a feature layer (add the layer ID to the end of the url like this: http://yoursite.com/arcgis/rest/services/yourservice/MapServer/0) into your app's web map.  When you do this, you are up against whatever the max records count would return so you may want to limit the scale at which you draw the feature service.

View solution in original post

11 Replies
RobertScheitlin__GISP
MVP Emeritus

Majdoleen,

   Is the map label a annotation layer in your map service?

0 Kudos
MajdoleenO_A__Awadallah
Occasional Contributor III

Hi Robert,

No it is not, but when we published it we enable the symbology and the label is displayed with the feature map.


Best,

Majdoleen

0 Kudos
RyanGatchell2
New Contributor III

You may be able to bring in this service as a feature layer (add the layer ID to the end of the url like this: http://yoursite.com/arcgis/rest/services/yourservice/MapServer/0) into your app's web map.  When you do this, you are up against whatever the max records count would return so you may want to limit the scale at which you draw the feature service.

MajdoleenO_A__Awadallah
Occasional Contributor III

Thank you Ryan, but this seems to be exhausting, since I need to do this for each layer separately!!!!!

which may take time and effort , and tha bad things is when doing the updates on the map, it will not reflect on the app !!!! https://community.esri.com/message/555963?et=watches.email.thread#555963

any idea !!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Majdoleen,

   your best solution would be to convert all your dynamic labeling to annotation Feature Classes in ArcMap and then republish your service so that the annotation will have a item listed in the LayerList widget that can be turned on and off.

0 Kudos
MichaelMiller2
Occasional Contributor III

or if you want to maintain the dynamic labeling of the elements, you could make another service that only shows the labels and also add this to your map. You then have the ability to show the elements themselves and labels and either can be toggled on or off.

MajdoleenO_A__Awadallah
Occasional Contributor III

Thank you all for the suggestion, but I don't prefer to create a new services for label, I was expected if they will enhance the WAB to have a function that allow the users themselves to turn on/off the label like the on in Geocortex !!

Clip_72.jpg

Best,

Majdoleen

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Majdoleen,

   OK if you are using ArcGIS Server 10.1 or greater than you can set the LayerDrawingOptions which has a showLabels property on the ArcGISDynamicMapServiceLayer

require([
 
"esri/layers/LayerDrawingOptions", "esri/renderers/SimpleRenderer", ...
], function(LayerDrawingOptions, SimpleRenderer, ... ) {
 
var layerDrawingOptions = [];
 
var layerDrawingOption = new LayerDrawingOptions();
 
  layerDrawingOption
.showLabels = false;
 
  layerDrawingOptions
[1] = layerDrawingOption;
  dynamicData
.setLayerDrawingOptions(layerDrawingOptions);
 
...
});

0 Kudos
MajdoleenO_A__Awadallah
Occasional Contributor III

Hi Robert,

yes I am using ArcGIS server 10.3.1, but I have no idea what do you mean with this code ? where I can find it ?

any screen shoot may help .

Best,

Majdoleen

0 Kudos