Select to view content in your preferred language

Labeling Info

1063
4
04-15-2013 09:59 AM
MarcoBrugna
Deactivated User
Hi,

is it possibile to specify the labelling info for a Dynamic Layer?

I've a page where the user select a column and a class break renderer is generated upon that column.
The problem is that the user doesn't see a label specifying the value of each polygon.

how can I solve this problem?


Regards
Marco
0 Kudos
4 Replies
JohnGravois
Deactivated User
for 10.1 dynamic layers you can decide whether or not you'd like to show labels by setting the showLabels property of the LayerDrawingOptions class
0 Kudos
MarcoBrugna
Deactivated User
Hi John,

unfortunately, showLabels isnt' enough for me.
I would like to change the labels expression in order to change the field used for Labelling.

I've see that in the REST API there is a JSON structure in order to define the Label Style.
How can I set this value into the Dynamic Layer?

{
    "labelPlacement": "esriServerPolygonPlacementAlwaysHorizontal",
    "labelExpression": "[TAG]",
    "useCodedValues": false,
    "symbol": {
     "type": "esriTS",
     "color": [78,78,78,255],
     "backgroundColor": null,
     "borderLineColor": null,
     "verticalAlignment": "bottom",
     "horizontalAlignment": "left",
     "rightToLeft": false,
     "angle": 0,
     "xoffset": 0,
     "yoffset": 0,
     "font": {
      "family": "Arial",
      "size": 12,
      "style": "normal",
      "weight": "bold",
      "decoration": "none"
     }
    },
    "minScale": 1999,
    "maxScale": 0,
    "where": ""
   }



Thanks
Marco

for 10.1 dynamic layers you can decide whether or not you'd like to show labels by setting the showLabels property of the LayerDrawingOptions class
0 Kudos
JohnGravois
Deactivated User
this is not currently possible.  here's the associated enhancement request.

[NIM079605: Add support to LayerDrawingOptions for labelingInfo property in JavaScript API]
0 Kudos
MarcoBrugna
Deactivated User
this is not currently possible.  here's the associated enhancement request.

[NIM079605: Add support to LayerDrawingOptions for labelingInfo property in JavaScript API]



Hi john,

Do you have an idea when this requirement will be implemented in the JSApi?
I have seen that in the FlexAPI it is already available.

(is there a way to implement this functionality by our own using the rest api?)


Thanks
Marco
0 Kudos