This is designed to add methods that allow the mapObj to be serialised. This enables it to be used effectively in sessions.
It is used in exactly the same way as the base mapObject except that properties (member variables) must be accessed through the get($property_name) method.
Definition at line 60 of file map.php.
Public Member Functions | |
Map ($map_file, $new_map_path=null) | |
Constructs a Map. | |
loadMapString ($map_string) | |
Loads the map configuration from a string, replacing the current map object. | |
getCObj () | |
Get the underlying MapScript mapObj resource. | |
setCObj ($map) | |
Replace the current mapscript mapObj resource. | |
& | get ($property_name) |
Return the value of the specified property of the mapscript mapObj resource. | |
clone () | |
Returns a handle to a new mapObj which is a clone of the base mapObj. | |
set ($property_name, $new_value) | |
Set map object property to new value. | |
getsymbolbyname ($symbol_name) | |
Get the symbol index using the specified name. | |
preparequery () | |
Calculate the scale of the map and assign it to the map->scale. | |
prepareImage () | |
Return handle on blank image object. | |
draw () | |
Render the map and return a handle on the image object. | |
drawQuery () | |
Render a query map and return a handle on the image object. | |
drawLegend () | |
Render the legend and return a handle on the image object. | |
drawReferenceMap () | |
Render the reference map and return a handle on the image object. | |
drawScaleBar () | |
Render the scale bar and return a handle on the image object. | |
embedlegend ($image) | |
Embeds a legend. | |
embedScalebar ($image) | |
Embeds a scalebar. | |
drawLabelCache ($image) | |
Renders the labels for a map. | |
getLayer ($index) | |
Returns a layerObj from the map given an index value. | |
getLayerByName ($layer_name) | |
Returns a layerObj from the map given a layer name. | |
getcolorbyindex ($iCloIndex) | |
Returns a colorObj corresponding to the colour index in the palette. | |
setextent ($minx, $miny, $maxx, $maxy) | |
Set the map extents from georeferenced values. | |
zoompoint ($nZoomFactor, $oPixelPox, $nImageWidth, $nImageHeight, $oGeorefExt, $oMaxGeorefExt=null) | |
Zoom to a given XY position. | |
zoomrectangle ($oPixelExt, $nImageWidth, $nImageHeight, $oGeorefExt) | |
Set the map extent to a given value. | |
zoomscale ($nScale, $oPixelPos, $nImageWidth, $nImageHeight, $oGeorefExt, $oMaxGeorefExt=null) | |
Zoom in or out to a given XY position so that the map is displayed at a specified scale. | |
queryByPoint ($point, $mode, $buffer) | |
Query all selected layers in map at specific point location. | |
queryByRect ($rect) | |
Query all selected layers in the map using a specified extent. | |
queryByShape ($shape) | |
Query all selected layers in the map based on a single shape. | |
queryByFeatures ($slayer) | |
Perform a query based on a previous set of results from a layer. | |
queryByIndex ($layerindex, $tileindex, $shapeindex, $addtoquery=MS_FALSE) | |
Add a specific shape on a given layer to the query result. | |
savequery ($filename) | |
Save the current query in a file. | |
loadquery ($filename) | |
Loads a query from a file. | |
freequery ($layerindex) | |
Frees the query result on a layer. | |
save ($filename) | |
Save current map object state to a file. | |
getProjection () | |
Returns a string representation of the projection. | |
setProjection ($proj_params, $bSetUnitsAndExtents=MS_FALSE) | |
Set map projection and coordinate system. | |
setWKTProjection ($proj_params, $bSetUnitsAndExtents=MS_FALSE) | |
Set map projection and coordinate system. | |
getMetaData ($name) | |
Fetch metadata entry by name. | |
setMetaData ($name, $value) | |
Set a metadata entry for the map. | |
removeMetaData ($name) | |
Remove a metadata entry for the map. | |
getLayersIndexByGroup ($groupname) | |
Return an array containing layer indices for all layers belonging to a specified group. | |
getAllGroupNames () | |
Return an array containing all group names used in the map. | |
getAllLayerNames () | |
Return an array containing all layer names. | |
moveLayerUp ($layerindex) | |
Move a layer up in the drawing hierarchy. | |
moveLayerDown ($layerindex) | |
Move a layer down the drawing hierarchy. | |
getlayersdrawingorder () | |
Return an array containing layer indices in the order in which they are drawn. | |
setlayersdrawingorder ($layeryindex) | |
Set the order in which layers are drawn. | |
processtemplate ($params, $generateimages=MS_TRUE) | |
Process the template file specified in the web object and return the result. | |
processquerytemplate ($params, $generateimages=MS_TRUE) | |
Process the query template file and return the result. | |
processlegendtemplate ($params) | |
Process the legend template file and return the result. | |
setSymbolSet ($fileName) | |
Load and set a symbol file dynamically. | |
getNumSymbols () | |
Return the number of symbols in the map. | |
setFontSet ($fileName) | |
Load and set a new fontset. | |
selectOutputFormat ($type) | |
Selects the output format to be used in the map. | |
saveMapContext ($filename) | |
Save the current map object state in WMS Map Context format to a file. | |
loadMapContext ($filename) | |
Load a WMS Map context XML file into the current mapObj. | |
applySLD ($sldxml) | |
Apply an SLD document to the map file. | |
applySLDURL ($sldurl) | |
Apply the SLD document pointed to by the URL to the map file. | |
generateSLD () | |
Returns an SLD XML string based on all classes found in all layers. | |
toString () | |
Returns the current mapfile as a string. | |
__sleep () | |
Prepare object for serialisation. | |
__wakeup () | |
Initialise object after unserialisation. | |
Public Attributes | |
$_m = null | |
The PHP MapScript mapObj resource. | |
$_map_string = null | |
The serialised mapfile. |
|
Constructs a Map.
|
|
Prepare object for serialisation. This method is automatically called just before the object is serialised to carry out clean-up operations. See the PHP documentation at http://www.php.net/manual/en/language.oop.magic-functions.php for more information.
Reimplemented in MapManager. |
|
Initialise object after unserialisation. This method is automatically called just after the object is unserialised and ensures it is properly initialised. See the PHP documentation at http://www.php.net/manual/en/language.oop.magic-functions.php for more information.
Reimplemented in MapManager. |
|
Apply an SLD document to the map file.
|
|
Apply the SLD document pointed to by the URL to the map file.
|
|
Returns a handle to a new mapObj which is a clone of the base mapObj. All parameters in the current mapObj are copied to the new mapObj.
|
|
Render the map and return a handle on the image object.
Reimplemented in MapManager. |
|
Renders the labels for a map.
|
|
Render the legend and return a handle on the image object.
|
|
Render a query map and return a handle on the image object.
|
|
Render the reference map and return a handle on the image object.
|
|
Render the scale bar and return a handle on the image object.
|
|
Embeds a legend.
|
|
Embeds a scalebar.
|
|
Frees the query result on a layer.
|
|
Returns an SLD XML string based on all classes found in all layers.
|
|
Return the value of the specified property of the mapscript mapObj resource.
|
|
Return an array containing all group names used in the map.
|
|
Return an array containing all layer names.
|
|
Get the underlying MapScript mapObj resource.
|
|
Returns a colorObj corresponding to the colour index in the palette.
|
|
Returns a layerObj from the map given an index value.
|
|
Returns a layerObj from the map given a layer name.
|
|
Return an array containing layer indices in the order in which they are drawn.
|
|
Return an array containing layer indices for all layers belonging to a specified group.
|
|
Fetch metadata entry by name.
|
|
Return the number of symbols in the map.
|
|
Returns a string representation of the projection.
|
|
Get the symbol index using the specified name.
|
|
Load a WMS Map context XML file into the current mapObj.
|
|
Loads the map configuration from a string, replacing the current map object.
Definition at line 97 of file map.php. References unique_mapfile(). |
|
Loads a query from a file.
|
|
Move a layer down the drawing hierarchy.
|
|
Move a layer up in the drawing hierarchy.
|
|
Return handle on blank image object.
|
|
Calculate the scale of the map and assign it to the map->scale.
|
|
Process the legend template file and return the result.
|
|
Process the query template file and return the result.
|
|
Process the template file specified in the web object and return the result.
|
|
Perform a query based on a previous set of results from a layer.
|
|
Add a specific shape on a given layer to the query result.
|
|
Query all selected layers in map at specific point location.
|
|
Query all selected layers in the map using a specified extent.
|
|
Query all selected layers in the map based on a single shape.
|
|
Remove a metadata entry for the map.
|
|
Save current map object state to a file.
|
|
Save the current map object state in WMS Map Context format to a file.
|
|
Save the current query in a file.
|
|
Selects the output format to be used in the map.
|
|
Set map object property to new value.
|
|
Replace the current mapscript mapObj resource.
|
|
Set the map extents from georeferenced values.
|
|
Load and set a new fontset.
|
|
Set the order in which layers are drawn.
|
|
Set a metadata entry for the map.
|
|
Set map projection and coordinate system.
|
|
Load and set a symbol file dynamically.
|
|
Set map projection and coordinate system.
|
|
Returns the current mapfile as a string.
Definition at line 709 of file map.php. References unique_mapfile(). |
|
Zoom to a given XY position.
|
|
Set the map extent to a given value.
|
|
Zoom in or out to a given XY position so that the map is displayed at a specified scale.
|
|
The PHP MapScript mapObj resource.
|
|
The serialised mapfile. This is only ever populated during serialisation; it contains the mapfile which is then used to re-instantiate the mapscript mapObj when the object is unserialised. Therefore for all intents and purposes it will be null. |