Opened 18 years ago

Last modified 16 years ago

#1980 new defect

mapObj->save(...) causes MapFile to lose GridObj->labelformat value

Reported by: aaronkoning@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by hobu)

When using PHP MapScript to mapObj->save(...) a MapFile, it appears that the
LABELFORMAT variable in the GRID object is set to null (which results in decimal
coordinates being displayed, even if DDMM or DDMMSS is selected).

Change History (2)

comment:1 by hobu, 17 years ago

Description: modified (diff)

graticuleObj and grid layers do not currently have copy support in mapcopy.c, and labelformat is not a normal property of layerObj, so it is not currently copied.

comment:2 by tamas, 16 years ago

Component: MapScript-PHPMapServer C Library
Owner: changed from mapserverbugs to sdlime

I think we can fix this easily by copying the graticuleObj (layerinfo) in this case. However I consider this graticule stuff is quite hacky as it stands, since the layers shouldn't expose their internal layerinfo. These parameters should instead exist in layer metadata or so. This would save much of the the extra code we currently have in loadLayer and writeLayer and the confusion about the effects when setting the GRID parameter in the mapfiles.

Note: See TracTickets for help on using tickets.