retrieving the legend images using wms(i only get blank images)

Eduard Witteveen e.witteveen at HAWARIT.COM
Wed Jun 1 04:10:03 EDT 2005


Hello list,

I am writing my own C# viewer and i must say that it is (or appears to
be) easy to create your own viewer using wms.

Im now trying to retrieve the images for the legend. I'd expected to
retrieve the images for the layer by using the url that was specified in
the xml document from the following url:
http://10.0.0.50:8121/cgi-bin/mapserv.exe?map=/ms4w/apps/Bedris/Bedris.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
with xpath: //Layer/Style/LegendURL/OnlineResource/@xlink:href
(sample: http://mail.dijkoraad-hawar.nl/download/capabilities.xml).

When i view the images from the first href
(http://10.0.0.50:8121/cgi-bin/mapserv.exe?map=/ms4w/apps/Bedris/Bedris.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=Woongebouw-utw&format=image/png),
i only see a blank image.
When i view the image with the gmapfactory viewer
(http://www.maptools.org/) using the same map i see the image.
(sample: http://mail.dijkoraad-hawar.nl/download/woongebouw-utw.png vs
http://mail.dijkoraad-hawar.nl/download/woongebouw-utw-reference.png).

Also, when i try to retrieve images for borders(lines), i also get a
different image
(for sample look at http://mail.dijkoraad-hawar.nl/download/contouren.png vs
http://mail.dijkoraad-hawar.nl/download/countouren-reference.png).

I've read something about a style parameter, but this didnt help me much
further on google / WMS specification(WMS specification does not tell me
which parameters i could use).
Can somebody tell me how i can get a image representation for the layers
i've got(or give me some pointers)?

In my current setup, i =only= want to have a image of 20x10 px without
any text in it.

--
Ing. Eduard Yeb Witteveen           Software Engineer
Hawar Information Technology bv   lid Dijkoraad Groep
De Wymerts 7  8701 WT                        Bolsward
Tel: +31 (0)515 570333         Fax: +31 (0)515 570335
http://www.hawarit.com/             nl_NL fy_NL en_US



More information about the mapserver-users mailing list