Select to view content in your preferred language

WMS layers and their legends

7221
2
03-04-2011 01:15 AM
HugoDurana
Emerging Contributor
Hey there!

I've been scratching my head over this and i seem to be getting nowhere with this:
How to get legend info from a WMS layer.

I've fiddling with Robert Scheitlin's TOC Widget (the legend part, of course), but it is getting me nowhere.

Any suggestions on how should i approach this issue?

Thanks,
Hugo.
Tags (2)
0 Kudos
2 Replies
by Anonymous User
Not applicable
Not all WMS servers support legends, so you will need to check the services capabilites first. If a legend is supported you can access the symbol swatches for each layer to construct the legend yourself.

For example:

http://sampleserver1.arcgisonline.com/arcgis/services/specialty/esri_statescitiesrivers_usa/mapserve...

has legend information with urls to each legend items swatch.

WMS Services published via ArcGIS server 10 support GetLegendGraphic:

http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/WMS_scope_and...

http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Communicating...
0 Kudos
Claudia_JYoung
Emerging Contributor

Michael,

How did you add in the URL legend in the Legend widget Flex code? Have you implemented before? if yes? can you share the code? I am trying to find out how to do it for Flex viewer for ArcGIS 2.5 and 3.6.

Regards,

0 Kudos