retrieving the legend images using wms(i only get blank images)
Bart van den Eijnden
BEN at SYNCERA-ITSOLUTIONS.NL
Wed Jun 1 01:25:01 PDT 2005
Hi,
you might get some info out of the following bug report:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=653
Do you have NAMEs defined for your CLASSes? What result do you get when you use the legend utility on your WMS server map file?
> In my current setup, i =only= want to have a image of 20x10 px without any text in it.
Then you should add the Rule parameter to the request with the CLASS name you want to see and specify width and height.
Btw, you are also missing wms_title METADATA in your MAP file for your WMS service.
Best regards,
Bart
Bart van den Eijnden
Syncera-ITSolutions
Postbus 270
2600 AG DELFT
tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl
>>> Eduard Witteveen <e.witteveen at HAWARIT.COM> 06/01/05 10:10am >>>
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