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

thomas bonfort thomas.bonfort at gmail.com
Thu Apr 17 09:25:10 PDT 2014


Tamas,
Your proposition seems OK to me. I'd use a graticuleObj* in the
layerObj rather than a graticuleObj, to keep ressources consumed to
the minimum (as in practice there would be at most one layer with the
need for a graticuleobj).

best regards,
thomas

On 17 April 2014 13:23, Tamas Szekeres <szekerest at gmail.com> wrote:
> 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
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list