GetLegendGraphic and Scalebar
Kralidis,Tom [Burlington]
Tom.Kralidis at EC.GC.CA
Tue Aug 28 04:45:29 PDT 2007
> > Is it possible to request a scalebar graphic from a mapserver WMS
> > service?
> > To request a legend you can call getlegendgraphic:
> >
> http://my.host.com/cgi-bin/mapserver.cgi?map=test.map&SERVICE=WMS&VERS
> > ION=1.0.0&REQUEST=getlegendgraphic&LAYER=world_line&FORMAT=PNG
> >
> > Is there something like getscalebargraphic?
> > Thanks in advance
> > Maarten
> >
> Dear Maarten,
>
> no, the WMS specification only allows these requests:
>
> -GetCapabilities(must)
> -Getmap (must)
> -getFeatureinforequest (optional)
> -getlegendgraphic (optional)
> -getStyle (optional)
> -describelayer (optional)**
>
> Have a look at:
> http://mapserver.gis.umn.edu/docs/howto/wms_server
>
> For having a scalebar you need a function in your wms-client
> (optionally you may set the scalebar "INIMAGE" but the result
> does not look well.... )
>
CGI mode offers a mode=scalebar option:
http://example.org/mapserv?map=/path/to/map.map&mode=scalebar&mapext=-18
0.000000%20-90.000000%20180.000000%2090.000000&map_units=dd
Not WMS per se (is there any reason you'd want this back from a WMS?),
but will return a scalebar graphic.
..Tom
More information about the MapServer-users
mailing list