[mapserver-users] DEFRESOLUTION and drawLegendIcon / GetLegendGraphic

Radim Blazek radim.blazek at gmail.com
Mon Dec 21 07:19:34 PST 2009


Hi,
I appreciate a lot the new DEFRESOLUTION.
I would like to ask you, what is the right (and easy) way to get
symbol icon of the right size corresponding to the map (but without
drawing the map) in mapscript? I would like just to just set the same
bbox and map extent on map object which is used for the map, and then
somehow to get the icon image.

It seems, that in msDrawLegendIcon is used layer->scalefactor (which
is set to layer->symbolscaledenom/map->scaledenom*map->resolution/map->defresolution
in  msPrepareImage(called from msDrawMap) ) but layer->scalefactor is
internal, so I cannot set it from mapscript (I have separated drawing
of map and legend, so the msDrawMap is not called when I need the
legend).

Does  WMS GetLegendGraphic support  somehow  DEFRESOLUTION? It seems
to be ignored.

Until now, we were using  GetLegendGraphic + some our params and code
to rescale symbols, but obviously after the  DEFRESOLUTION was
introduced, I would like to use directly support in mapserver, please
help me how to do it.

Another related question, can WMS GetLegendGraphic support somehow
SYMBOLSCALEDENOM? I mean, can I send (or set in mapscript) a map scale
to get properly scaled symbol?

Thanks
Radim



More information about the MapServer-users mailing list