1

Topic: WMS Species Density Legend

Can anyone tell me how to get a legend for a WMS dataset species density map please? e.g. for:

http://gis.nbn.org.uk/arcgis/rest/servi … WMSServer?

There is mention of GetLegendGraphic in the documentation at http://data.nbn.org.uk/Documentation/We … _Services/ but I can't figure-out what to do with it.

Thanks, Keith

2

Re: WMS Species Density Legend

Hi Keith,

sorry the documentation is a bit sparse there, here is an example of a wms call that returns a legend, hopefully you can use it as a basis for your legend call:

http://gis.nbn.org.uk/arcgis/rest/servi … FORMAT=gif

Let us know how you get on.

Regards, Jon

3 (edited by kbalmer 18-10-2012 12:54:25)

Re: WMS Species Density Legend

Hi Jon,

Thanks for that. When I plug that URL into MapInfo and do "Test Url" I get the following error message:

"XML DOM Document Parsing Error: An invalid character was found in text content.
The server returned data which was neither in the requested format nor a recognized service exception: %.PNG
Unable to retrieve capabilities from the WMS Server"

but it does appear okay in firefox. I'd presumed it would appear in MapInfo in the same way as the map does, probably not georeferenced as that doesn't make sense, but available as an opened mage that I could add to a layout. Is this not the case? Do I have to separately use a web-browser to get a legend, save it, then open it as an image in MapInfo?

Edit: Also, I note that changing the dataset key in the URL makes no difference to the legend I see in firefox - it's always 1 to 51 regardless of whether the dataset has one species (GA000703) or 1653 species (GA000482). Also there is nothing in the URL that says what resolution size is in use for the map which must surely have an effect on the legend? (I tried adding &LAYERS=3 to the end but just got an error message as I presume this is only applicable to GetMap).

Regards, Keith