Home | Docs | Issue Tracker | FAQ | Download | |
Author: | Alan Boudreault |
---|---|
Contact: | aboudreault at mapgears.com |
Revision: | $Revision: 10033 $ |
Date: | $Date: 2010-03-30 15:58:30 -0400 (Tue, 30 Mar 2010) $ |
Table of Contents
This document describes the changes that must be made to PHP MapScript applications when migrating from one MapServer version to another (i.e. backwards incompatibilities), as well as information on some of the new features.
PHP 5.2.0 or more recent is required. The support for earlier versions has been dropped.
PHP MapScript now uses exceptions for error reports. All errors are catchable. There are no more fatal errors reported via the standard uncatchable PHP system (Only Warnings).
$map->scaledenom = 25000;
Note
The set/setProperty methods are still available.
$myShape = ms_newShapeObj(MS_SHAPE_LINE); // or
$myShape = new shapeObj(MS_SHAPE_LINE);
Note
All object constructors throw an exception on failure.
Note
ms_newSymbolObj() and new symbolObj() are different
Class properties that have been removed:
- classObj: maxscale, minscale
- layerObj: labelsizeitem, labelangleitem, labelmaxscale, labelminscale, maxscale, minscale, symbolscale, transparency
- legendObj: interlace, transparent
- mapObj: imagetype, imagequality, interlace, scale, transparent
- scalebarObj: interlace, transparent
- symbolObj: gap, stylelength
- webObj: minscale, maxscale
Class methods that have been removed:
- imageObj: free
- layerObj: getFilter, getShape
- lineObj: free
- pointObj: free
- projectionObj: free
- rectObj: free
- shapeObj: union_geos
- symbolObj: getstylearray
- classObj: clone
- styleObj: clone
- mapObj: clone
- outputFormatObj: getformatoption, setformatoption
mapObj->queryByIndex(): default behavior for the addToQuery parameter was not ok, now it is.
referenceMapObj has new properties: marker, markername, markersize, maxboxsize, minboxsize.
shapeFileObj is automatically closed/writed on destroy. (At the end of the script or with an explicit free(), unset())
To free the cache, you’ll have to call the method freeCache() rather than free().
- layerObj: setProcessing, addFeature, draw
- mapObj: moveLayerUp, moveLayerDown, zoomRectangle, zoomScale, setProjection, setWKTProjection, setLayersDrawingOrder
- outputFormatObj: validate
- scalebarObj: setImageColor
- symbolObj: setPoints, setPattern
- classObj: clone
- mapObj: clone, draw, drawQuery getLayerByName, getProjection
- layerObj: nextShape, getExtent
- styleObj: clone
- layerObj: getItems, getProcessing, getGridIntersectionCoordinates
- mapObj: getLayersIndexByGroup, getAllGroupNames, getLayersDrawingOrder, getAllLayerNames
- symbolObj: getPatternArray