Select to view content in your preferred language

Legend Labor for DynamicMapService

659
1
08-10-2011 12:39 PM
ClaytonDonahue
Emerging Contributor
Hello,

I have a question about how to set a name/label for a dynamic map service. We are creating our service in Actionscript using the Flex API like so:

var service:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(url);


We are then using the "Legend" component to create a dynamic legend. The problem is that the legend is displaying "ArcGISDynamicMapServiceLayer757" as its title.



So, I was wonder whether there is a way to set the "name" property for the Dynamic Layer (it seems to be read-only), or whether there is a way to modify this entry within the legend?

Any tips or suggestions appreciated!

Thank you,
- Clayton
Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Clayton,

   Sure it is as simple as this:
var service:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(url);
service.name = service.id =  "My service name";
0 Kudos