This object extends the basic Map object to include the provision of a single zoom API as well as the ability to register functions that will render specific layers when the MapManager::draw() is called.
Definition at line 329 of file mapmanager.php.
Public Member Functions | |
MapManager ($map_file, $new_map_path=null) | |
Constructs a MapServer_Manager. | |
getClickType () | |
Returns the type of the user click. | |
setZoomType ($zoom_type) | |
Determine the type of zoom operation to execute. | |
getZoomType () | |
Retrieve the type of zoom operation. | |
setZoomScale ($zoom_scale) | |
Set the map scale that will be zoomed to when the zoom type is set to MM_ZOOM_SCALE. | |
getZoomScale () | |
Get the map scale that will be zoomed to when the zoom type is set to MM_ZOOM_SCALE. | |
setZoomExtent ($zoom_extent) | |
Set the georeferenced extent to which the map will be set when the zoom type is MM_ZOOM_EXTENT. | |
getZoomExtent () | |
Get the georeferenced extent to which the map will be set when the zoom type is MM_ZOOM_EXTENT. | |
getMapClick ($as_map_coords=true) | |
Get the click point. | |
setMapClick ($map_click, $click_type) | |
Set the click point. | |
setZoomLevel ($zoom_level) | |
Specify the multiplication factor with which a zoom operation is applied. | |
getZoomLevel () | |
Return the multiplication factor with which zoom operations are applied. | |
getMaxExtent () | |
Get the maximum extent of the map in georeferenced coordinates. | |
setMaxExtent ($extent) | |
Set the maximum extent of the map. | |
layerExists ($layer_name) | |
Check whether a layer exists. | |
layerIsOn ($layer_name) | |
Check whether a layer is turned on. | |
turnLayerOn ($layer_name, $toggle_group=false) | |
Turn a layer on. | |
turnLayerOff ($layer_name, $toggle_group=false) | |
Turn a layer off. | |
isGroupLayer ($layer_name) | |
Check whether the layer is a member of a group. | |
groupExists ($group_name) | |
Check whether a group name exists. | |
turnGroupOff ($group_name) | |
Turn all member layers of a group off. | |
turnGroupOn ($group_name) | |
Turn all member layers of a group on. | |
layerIsQueryable ($layer_name) | |
Check whether a layer can be queried. | |
layerIsSelectable ($layer_name) | |
Check whether a layer can be selected. | |
setLayerSelectable ($layer_name, $selectable) | |
Change the selectability status of a layer. | |
getSelectableLayerNames () | |
Retrieve the names of all layers which are considered selectable. | |
setLayerRenderer ($layer_name, $renderer) | |
Set or replace a layer's renderer. | |
getLayerRenderer ($layer_name) | |
Retrieve a layer's renderer. | |
removeLayerRenderer ($layer_name) | |
Remove a layer's renderer. | |
layerRendererExists ($layer_name) | |
Check whether a layer has a renderer set. | |
imagePointToMapPoint ($image_point) | |
Convert a point in image coordinates to a point in map coordinates. | |
mapPointToImagePoint ($map_point) | |
Convert a point in geographic coordinates to pixel coordinates. | |
imagePointToRefMapPoint ($image_point) | |
Convert a point in image coordinates to a point in map coordinates valid for the reference map. | |
refMapPointToImagePoint ($map_point) | |
Converts a point in geographic coordinates to a point in pixel coordinates valid for the reference map. | |
zoomedToMinScale () | |
Check whether the map is zoomed in to the minimum (largest) allowed scale. | |
zoomedToMaxScale () | |
Check whether the map is zoomed out to the maximum (smallest) allowed scale. | |
zoomedToMaxExtent () | |
Check whether the map is zoomed out to the maximum allowed extent. | |
zoom () | |
Perform a zoom operation. | |
zoomToExtent ($extent) | |
Zoom to a specific extent. | |
zoomToScale ($scale) | |
Zoom to a specific scale. | |
zoomToPoint ($map_point, $zoom_level) | |
Zoom to a point. | |
panToPoint ($map_point) | |
Pan to a point. | |
zoomInToPoint ($map_point) | |
Zoom in to a point. | |
zoomOutToPoint ($map_point) | |
Zoom out from a point. | |
zoomOutToMapClick () | |
Zoom out from the map click. | |
panToMapClick () | |
Pan to the map click. | |
zoomInToMapClick () | |
Zoom in to the map click. | |
draw () | |
Calls the MapManager::drawLayer() method on all layers and renders the label cache. | |
drawLayer ($layer, &$imageObj) | |
Renders a layer to an imageObj. | |
__wakeup () | |
Initialise object after unserialisation. | |
__sleep () | |
Prepare object for serialisation. | |
Public Attributes | |
$max_extent | |
The maximum georeferenced extent of the map. | |
$zoom_level | |
The current zoom factor. | |
$layer_renderers | |
Associative array mapping layer names to the function which will render them. | |
$zoom_type | |
Current value containing a MM_ZOOM_* constant. | |
$zoom_scale | |
The scale to which the map should zoom if MM_ZOOM_SCALE is the zoom type. | |
$zoom_extent | |
The extent to which the map should zoom if MM_ZOOM_EXTENT is the zoom type. | |
$map_click | |
The position of the map click in georeferenced coordinates. | |
$click_type | |
A MM_CLICK_* constant specifying the type of map clicked. |
|
Constructs a MapServer_Manager. Passes it's arguments to the Map base class and performs various initialisations such as setting the zoom type to MM_ZOOM_MAN. Definition at line 359 of file mapmanager.php. References MM_ZOOM_PAN. |
|
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 from Map. Definition at line 1168 of file mapmanager.php. References $max_extent, $zoom_extent, and rectToString(). |
|
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 from Map. Definition at line 1154 of file mapmanager.php. References stringToRect(). |
|
Calls the MapManager::drawLayer() method on all layers and renders the label cache. Also embeds the legend and scale if required.
Reimplemented from Map. Definition at line 1091 of file mapmanager.php. |
|
Renders a layer to an imageObj. If a layer renderer has been set this is used, otherwise the default mapserver renderer is used
Definition at line 1133 of file mapmanager.php. |
|
Returns the type of the user click. The map click point can be specified by either clicking on the reference map or on the main map. The result of this method shows which is true for the current instance.
Definition at line 379 of file mapmanager.php. |
|
Retrieve a layer's renderer.
Definition at line 746 of file mapmanager.php. |
|
Get the click point. User interaction with the map is generally achieved using a 'click point'. This is a point location of interest on the map.
Definition at line 448 of file mapmanager.php. |
|
Get the maximum extent of the map in georeferenced coordinates.
Definition at line 502 of file mapmanager.php. |
|
Retrieve the names of all layers which are considered selectable.
Definition at line 710 of file mapmanager.php. |
|
Get the georeferenced extent to which the map will be set when the zoom type is MM_ZOOM_EXTENT.
Definition at line 434 of file mapmanager.php. |
|
Return the multiplication factor with which zoom operations are applied.
Definition at line 493 of file mapmanager.php. |
|
Get the map scale that will be zoomed to when the zoom type is set to MM_ZOOM_SCALE.
Definition at line 416 of file mapmanager.php. |
|
Retrieve the type of zoom operation.
Definition at line 398 of file mapmanager.php. |
|
Check whether a group name exists.
Definition at line 603 of file mapmanager.php. |
|
Convert a point in image coordinates to a point in map coordinates.
Definition at line 786 of file mapmanager.php. Referenced by imagePointToRefMapPoint(). |
|
Convert a point in image coordinates to a point in map coordinates valid for the reference map.
Definition at line 814 of file mapmanager.php. References imagePointToMapPoint(). |
|
Check whether the layer is a member of a group.
Definition at line 589 of file mapmanager.php. |
|
Check whether a layer exists.
Definition at line 523 of file mapmanager.php. |
|
Check whether a layer is turned on. A layer is defined as being on if it's status == MS_ON
Definition at line 537 of file mapmanager.php. |
|
Check whether a layer can be queried. A layer can be queried if it or any of it's classes contains a value for the TEMPLATE property,
Definition at line 647 of file mapmanager.php. |
|
Check whether a layer can be selected. A layer can be selected if it contains the metadata name 'SELECTABLE' with a value of 'ON'
Definition at line 672 of file mapmanager.php. |
|
Check whether a layer has a renderer set.
Definition at line 774 of file mapmanager.php. |
|
Convert a point in geographic coordinates to pixel coordinates.
Definition at line 800 of file mapmanager.php. Referenced by refMapPointToImagePoint(). |
|
Pan to the map click.
Definition at line 1057 of file mapmanager.php. References $map_click. |
|
Pan to a point.
Definition at line 1013 of file mapmanager.php. |
|
Converts a point in geographic coordinates to a point in pixel coordinates valid for the reference map.
Definition at line 830 of file mapmanager.php. References mapPointToImagePoint(). |
|
Remove a layer's renderer. Once a layer renderer is removed the default PHP MapScript rendering is used.
Definition at line 761 of file mapmanager.php. |
|
Set or replace a layer's renderer. A layer renderer is a function or method which accepts an imageObj. This imageObj will be used to draw a particular map layer.
Definition at line 730 of file mapmanager.php. |
|
Change the selectability status of a layer. If a layer is selectable, it is seen as being open to having it's STATUS property toggled programatically. Otherwise the STATUS value will not be altered by a MapServer_Manager instance.
Definition at line 695 of file mapmanager.php. |
|
Set the click point. User interaction with the map is generally achieved using a 'click point'. This is a point location of interest on the map.
Definition at line 467 of file mapmanager.php. References $click_type, and $map_click. |
|
Set the maximum extent of the map.
Definition at line 511 of file mapmanager.php. |
|
Set the georeferenced extent to which the map will be set when the zoom type is MM_ZOOM_EXTENT.
Definition at line 425 of file mapmanager.php. References $zoom_extent. |
|
Specify the multiplication factor with which a zoom operation is applied.
Definition at line 478 of file mapmanager.php. References $zoom_level, and zoom(). |
|
Set the map scale that will be zoomed to when the zoom type is set to MM_ZOOM_SCALE.
Definition at line 407 of file mapmanager.php. References $zoom_scale. |
|
Determine the type of zoom operation to execute.
Definition at line 389 of file mapmanager.php. References $zoom_type. |
|
Turn all member layers of a group off.
Definition at line 612 of file mapmanager.php. |
|
Turn all member layers of a group on.
Definition at line 628 of file mapmanager.php. |
|
Turn a layer off.
Definition at line 571 of file mapmanager.php. |
|
Turn a layer on.
Definition at line 553 of file mapmanager.php. |
|
Perform a zoom operation. The type of zoom operation to be performed is determined by the MapManager::setZoomType() method. Based on the zoom type, the correct zoom* method is called. These methods should be viewed as protected and not called directly by Map_Manager instances.
Definition at line 917 of file mapmanager.php. References $zoom_extent, $zoom_scale, $zoom_type, MM_ZOOM_EXTENT, MM_ZOOM_IN, MM_ZOOM_NONE, MM_ZOOM_OUT, MM_ZOOM_PAN, and MM_ZOOM_SCALE. Referenced by setZoomLevel(). |
|
Check whether the map is zoomed out to the maximum allowed extent.
Definition at line 890 of file mapmanager.php. References $max_extent. |
|
Check whether the map is zoomed out to the maximum (smallest) allowed scale.
Definition at line 869 of file mapmanager.php. Referenced by zoomToPoint(). |
|
Check whether the map is zoomed in to the minimum (largest) allowed scale.
Definition at line 848 of file mapmanager.php. |
|
Zoom in to the map click.
Definition at line 1072 of file mapmanager.php. References $map_click. |
|
Zoom in to a point.
Definition at line 1022 of file mapmanager.php. References $zoom_level. |
|
Zoom out from the map click.
Definition at line 1042 of file mapmanager.php. References $map_click. |
|
Zoom out from a point.
Definition at line 1032 of file mapmanager.php. References $zoom_level. |
|
Zoom to a specific extent.
Definition at line 954 of file mapmanager.php. References $max_extent. |
|
Zoom to a point.
Definition at line 989 of file mapmanager.php. References $max_extent, $zoom_level, and zoomedToMaxScale(). |
|
Zoom to a specific scale.
Definition at line 970 of file mapmanager.php. References $max_extent. |
|
A MM_CLICK_* constant specifying the type of map clicked.
Definition at line 351 of file mapmanager.php. Referenced by setMapClick(). |
|
Associative array mapping layer names to the function which will render them.
Definition at line 338 of file mapmanager.php. |
|
The position of the map click in georeferenced coordinates.
Definition at line 349 of file mapmanager.php. Referenced by panToMapClick(), setMapClick(), zoomInToMapClick(), and zoomOutToMapClick(). |
|
The maximum georeferenced extent of the map.
Definition at line 334 of file mapmanager.php. Referenced by __sleep(), zoomedToMaxExtent(), zoomToExtent(), zoomToPoint(), and zoomToScale(). |
|
The extent to which the map should zoom if MM_ZOOM_EXTENT is the zoom type.
Definition at line 344 of file mapmanager.php. Referenced by __sleep(), setZoomExtent(), and zoom(). |
|
The current zoom factor.
Definition at line 336 of file mapmanager.php. Referenced by setZoomLevel(), zoomInToPoint(), zoomOutToPoint(), and zoomToPoint(). |
|
The scale to which the map should zoom if MM_ZOOM_SCALE is the zoom type.
Definition at line 342 of file mapmanager.php. Referenced by setZoomScale(), and zoom(). |
|
Current value containing a MM_ZOOM_* constant.
Definition at line 340 of file mapmanager.php. Referenced by setZoomType(), and zoom(). |