[mapserver-dev] GRID setting in mapfile doesn't work as expected

Tamas Szekeres szekerest at gmail.com
Thu Apr 17 04:23:54 PDT 2014


I was surprised to see that the GRID option in the layer object still
doesn't work quite right due to conceptual problems that have been
mentioned several years ago, see for example:
https://github.com/mapserver/mapserver/issues/1980

In my use case, when I open a map file (with graticule grid) and then draw
the map, the grid settings are getting lost because drawlayer closes the
layer implicitly and the grid settings are stored in layerinfo (which is
the problem primarily).

In order to fix this issue how about making the following changes?

1. add graticuleObj to layerObj (mapserver.h)
2. load grid settings to layerObj->graticuleObj instead of layerinfo
(mapfile.c)
3. destroy graticuleObj in freeLayer instead of msGraticuleLayerClose
4. Modify the vtable handlers to use layerObj->graticuleObj instead of
layerinfo
5. copy the relevant settings of graticuleobj in mapcopy.c
6. Expose graticuleObj in mapscript. (if needed)


Best regards,

Tamas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20140417/1a00b0f4/attachment.html>


More information about the mapserver-dev mailing list