Class Giscuit_Map_Map

Description

Class for abstract mapserver object

  • copyright: Copyright (c) 2012 VEC

Located in /Map/Map.php (line 27)

Giscuit_Map_Abstract
   |
   --Giscuit_Map_Map
Class Constant Summary
 RESOLUTION = 72
Variable Summary
 bool $legend
 array $legendArr
 integer $maxHeight
 integer $maxWidth
 array $_extent
 array $_pixelSize
 array $_scale
 array $_size
Method Summary
 static bboxToExtent ( $theGeom, string $geometry) array
 static clearLegend () void
 static clearLink () void
 static drawError ( $text) void
 static extent2wld (array $info) string
 static extentToWktPolygon ( $extent, string $geometry) array
 static getDefaultOptions () array
 static getFontList ([ $options = array()]) array
 static getImage (string $file, [ $options = array()]) boolean
 static getInfoFromExtent ($extent $extent, $scale $scale, $resolution $resolution) array
 static getOutputformatsList ([ $options = array()]) array
 static getPublishOptions () array
 static getScaleFromResolution (float $resolution, [integer $dpi = self::RESOLUTION]) float
 static getSymbolList ([ $options = array()]) array
 static inchesPerUnit (string $unit) float
 static unitsToValue (string $unit) float
 __construct (string $mapFile) void
 addCurrentLayers ([ $options = array()]) void
 getExtent () array
 getPixelSize () array
 getScale () int
 getSize () array
 insertLayer ( $layer, [ $index = -1]) void
 setExtent ([ $extent = null]) void
 setPixelSize () void
 setSize ( $size) void
Variables
bool $addEditLayer = false (line 70)

Used for map printing, edit layer will be visibile

  • access: public
bool $dumpAllAttributes = false (line 112)

Dump all of the layer attributes

  • access: public
bool $legend = false (line 84)

Is $legendArr being populated with map legend data

  • access: public
array $legendArr = array() (line 77)

Contains data of the map legend

  • access: public
integer $maxHeight = 1200 (line 105)

Maximum image height

  • access: public
integer $maxWidth = 1920 (line 98)

Maximum image width

  • access: public
bool $withLayerSettings (line 91)

Load user defined settings

  • access: public
array $_extent (line 42)

Map extent

  • access: protected
array $_pixelSize (line 49)

Pixel size

  • access: protected
array $_scale (line 35)

Map scale

  • access: protected
array $_size (line 63)

Map extent

  • access: protected

Inherited Variables

Inherited from Giscuit_Map_Abstract

Giscuit_Map_Abstract::$children
Giscuit_Map_Abstract::$parent
Giscuit_Map_Abstract::$_obj
Methods
static bboxToExtent (line 492)

Convert bbox wkt representation into an array

  • access: public
array bboxToExtent ( $theGeom, string $geometry)
  • string $geometry: Geometry WKT string
  • $theGeom
static clearLegend (line 960)

Clear legend cache

  • access: public
void clearLegend ()
static clearLink (line 975)

Clear link cache

  • access: public
void clearLink ()
static drawError (line 889)

Create an error image and send it's output to output buffers

  • access: public
void drawError ( $text)
  • $text
static extent2wld (line 817)

Create a world file from extent

  • access: public
string extent2wld (array $info)
  • array $info: $info['extent'] to get the extent
static extentToWktPolygon (line 516)

Convert bbox wkt representation into an array

  • access: public
array extentToWktPolygon ( $extent, string $geometry)
  • string $geometry: Geometry WKT string
  • $extent
static getDefaultOptions (line 705)

Get default map options

  • access: public
array getDefaultOptions ()
static getFontList (line 535)

Get the list of available fonts

  • access: public
array getFontList ([ $options = array()])
  • $options $options:
    • forForm bool - Data will be returned as an array suitable for setMultiOptions method of Zend_Form
static getImage (line 733)

Generate a raster image using user's current layer settings

  • access: public
boolean getImage (string $file, [ $options = array()])
  • string $file: File name
  • $options $options:
    • mapOptions array - Map paramaters
    • resolution integer - Resolution
    • extent array - Extent
    • scale float - Scale
    • burnPolygon string - Burn area outside the polygon
    • watermark bool - Watermark the image
static getInfoFromExtent (line 843)

Using extent, scale and resolution calculate image and pixel size

  • access: public
array getInfoFromExtent ($extent $extent, $scale $scale, $resolution $resolution)
  • $extent $extent: Extent
  • $scale $scale: Scale
  • $resolution $resolution: Resolution
static getOutputformatsList (line 1045)

Get the list of available output formats

  • access: public
array getOutputformatsList ([ $options = array()])
  • $options $options
static getPublishOptions (line 687)

Get publish map options

  • access: public
array getPublishOptions ()
static getScaleFromResolution (line 673)

Convert scale to resolution

  • access: public
float getScaleFromResolution (float $resolution, [integer $dpi = self::RESOLUTION])
  • float $resolution: Resolution
  • integer $dpi: Dpi
static getSymbolList (line 595)

Get the list of available symbols

  • access: public
array getSymbolList ([ $options = array()])
  • $options $options:
    • forForm bool - Data will be returned as an array suitable for setMultiOptions method of Zend_Form
static inchesPerUnit (line 621)

How many inches 1 $unit has

  • access: public
float inchesPerUnit (string $unit)
  • string $unit: Unit name (inches, ft, mi, m, km, dd, yd)
static unitsToValue (line 647)

Conver unit name to MapScript constant

  • access: public
float unitsToValue (string $unit)
  • string $unit: Unit name (inches, ft, mi, m, km, dd)
Constructor __construct (line 120)

Class constructor

  • access: public
void __construct (string $mapFile)
  • string $mapFile: Full path to the mapserver configuration file
addCurrentLayers (line 360)

Add layers defined in the layers table to the map object

  • access: public
void addCurrentLayers ([ $options = array()])
  • $options $options:
    • withLayerSettings bool - Load user defined settings
    • addEditLayer bool - Used for map printing, edit layer will be visibile
    • watermark bool - Watermark content
getExtent (line 237)

Get map extent

  • access: public
array getExtent ()
getLayer (line 991)

Returns a layer from the map given an index

  • access: public
Giscuit_Map_Layer_Abstract getLayer (integer $index)
  • integer $index: Index value (0 = first layer)
getLayerByName (line 1007)

Returns a layer from the map given a layer name.

  • access: public
Giscuit_Map_Layer_Abstract getLayerByName (string $name)
  • string $name: Layer name
getPixelSize (line 216)

Get pixel size

  • access: public
array getPixelSize ()
getScale (line 160)

Get map scale

  • return: The normalized scale value
  • access: public
int getScale ()
getSize (line 286)

Get map size

  • access: public
array getSize ()
insertLayer (line 1034)
  • access: public
void insertLayer ( $layer, [ $index = -1])
  • $layer
  • $index
removeLayer (line 1021)

Remove a layer from the map

  • return: Returns the removed layer on success, else null.
  • access: public
Giscuit_Map_Layer_Abstract removeLayer (integer $index)
  • integer $index: Index value (0 = first layer)
setExtent (line 226)

Set map extent

  • access: public
void setExtent ([ $extent = null])
  • array $extent
setParamsFromConfig (line 141)

Set default map parameters

  • access: public
void setParamsFromConfig ()
setPixelSize (line 202)

Set pixel size

  • access: public
void setPixelSize ()
setSize (line 273)

Set map size

  • access: public
void setSize ( $size)
  • $size

Inherited Methods

Inherited From Giscuit_Map_Abstract

 Giscuit_Map_Abstract::getMsObj()
 Giscuit_Map_Abstract::__call()
 Giscuit_Map_Abstract::__get()
 Giscuit_Map_Abstract::__set()
Class Constants
RESOLUTION = 72 (line 56)

Resolution

Documentation generated on Fri, 23 Nov 2012 13:02:54 +0000 by phpDocumentor 1.4.3