[Mapserver-users] Referencemap and legend via WMS

Tom.Kralidis at CCRS.NRCan.gc.ca Tom.Kralidis at CCRS.NRCan.gc.ca
Tue Apr 8 10:08:49 EDT 2003


> -----Original Message-----
> From: Morten Nielsen [mailto:maillist at iter.dk]
> Sent: Tuesday, April 08, 2003 9:48 AM
> To: mapserver-users at lists.gis.umn.edu
> Subject: [Mapserver-users] Referencemap and legend via WMS
> 
> 
> Is it possible to request a referencemap or legend by using a 
> WMS request?
> I haven't been able to find anything in the WMS 
> specification, other than it
> possible could be requested via vendor-specific parameters.
> 

The OGC WMS spec does not support the processing of reference maps (i.e. a
image depicting an area of interest with an outline).

As for legend images, there are two routes here.

1./ The WMS GetCapabilities operation provides an XML document of what the
server is capable of providing, as well as its data holdings.

Within the layer elements, there is (optionally) an element which provides a
legend image URL.

This information (in WMS 1.1.1) is available at:

/WMT_MS_Capabilities/Capability/Layer/[may be more child layer
elements]/Layer/Style/LegendURL/OnlineResource/@xlink:href

You can basically pick up this URL and display it as an image in your app.

2./ Some WMSs support Styled Layer Descriptor (SLD).  An SLD-enabled WMS
provides a GetLegendGraphic operation, where your application can provide a
request to the SLD-WMS and get back a legend image.  Depending on the
classification and styling of the layer, the GetLegendGraphic operation
provides parameters which may change depending on the state of your app
(like scale), so your output legend image is representative of the map image
you are portraying at a given scale, etc.  Check out the SLD spec for more
details.

Having said this, it would be great to have MapServer support the LegendURL
element in Capabilities (I've filed this in Bugzilla) !!

..Tom





> /Morten Nielsen
> http://www.iter.dk
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 



More information about the mapserver-users mailing list