phpDocumentor SMap
Layers
[ class tree: SMap ] [ index: SMap ] [ all elements ]

Class: SMap_Layer_Grid

Source Location: /SMap/Layer.php

Class SMap_Layer_Grid

Class Overview

Lay out a grid

Lays out a grid, such as a latitude and longitude grid on the map.

Located in /SMap/Layer.php [line 1112]

SMap_Layer
   |
   --SMap_Layer_Grid

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From SMap_Layer

SMap_Layer::$id
SMap_Layer::$map

Inherited From SMap_Layer

SMap_Layer::__construct()
Construct the layer
SMap_Layer::cacheStatus()
How cachable is this layer?
SMap_Layer::getAdjViewBounds()
Adjust the view coords if we are in an image
SMap_Layer::getID()
Returns the ID of this layer
SMap_Layer::getImageFmt()
Recommended format for this layer
SMap_Layer::getImgObjs()
Composite this layer onto the tile (in a raster way)
SMap_Layer::getMap()
Return the map that contains this layer
SMap_Layer::getMapObjs()
Composite this layer onto the tile
SMap_Layer::hasCachedRects()
Might have cached rects in the DB
SMap_Layer::isValidZoom()
Is this layer zoomed to a useful resolution?
SMap_Layer::pxOffBound()
Get the bound at a pixel offset from a bound.

[ Top ]
Property Summary
array   $color   What color should the lines be?
array   $inc   Mark at multiples of this at given zoom
array   $subInc   How many divisions should each increment have?

[ Top ]
Method Summary
array   getImgObjs()   Draw the grid on a tile
void   getMapObjs()   Don't draw a map, but mark the tile grid in use
boolean   hasCachedRects()   The grid labels are transient and not cached
array   layGrid()   Calculate and create lines
void   setColor()   Seth the color of the lines
void   setGridInc()   Add the gridlines

[ Top ]
Properties
array   $color = array(255,255,255) [line 1129]

What color should the lines be?

API Tags:
Access:  protected


[ Top ]
array   $inc = null [line 1122]

Mark at multiples of this at given zoom

Keys are the zoom factor, values are pairs of distances in map units to mark the map.

API Tags:
Access:  protected


[ Top ]
array   $subInc = null [line 1138]

How many divisions should each increment have?

The increments for each zoom level.

API Tags:
Access:  protected


[ Top ]
Methods
getImgObjs  [line 1295]

  array getImgObjs( SMap_View $view, SMap_Tile $tile  )

Draw the grid on a tile

Parameters:
object The   $view:  parent view
object The   $tile:  tile to draw on

API Tags:
Return:  The draw objects
Access:  public


Redefinition of:
SMap_Layer::getImgObjs()
Composite this layer onto the tile (in a raster way)

[ Top ]
getMapObjs  [line 1265]

  void getMapObjs( SMap_View $view, SMap_Tile $tile  )

Don't draw a map, but mark the tile grid in use

The tile grid is in use around the edges, where the labels are drawn.

Parameters:
object The   $view:  parent view
object The   $tile:  tile to draw on

API Tags:
Access:  public


Redefinition of:
SMap_Layer::getMapObjs()
Composite this layer onto the tile

[ Top ]
hasCachedRects  [line 1349]

  boolean hasCachedRects( )

The grid labels are transient and not cached


API Tags:
Return:  False
Access:  public


Redefinition of:
SMap_Layer::hasCachedRects()
Might have cached rects in the DB

[ Top ]
layGrid  [line 1173]

  array layGrid( SMap_View $view, SMap_Tile $tile, float $increment, integer $sub, integer $min, integer $max, integer $startL, integer $stopL  )

Calculate and create lines

Parameters:
object The   $view:  view we are laying this in
object The   $tile:  tile that we are using
float   $increment:  The increment of the major lines
integer   $sub:  How many sub-increments to use
integer   $min:  Minimum array index
integer   $max:  Maximum array index
integer   $startL:  Starting end of the line index
integer   $stopL:  End of the line index

API Tags:
Return:  The line objects, with appropriate labels
Access:  protected


[ Top ]
setColor  [line 1156]

  void setColor( $r, $g, $b  )

Seth the color of the lines

Parameters:
   $r: 
   $g: 
   $b: 

API Tags:
Access:  public
See:  SMap_Layer_Grid::$color


[ Top ]
setGridInc  [line 1146]

  void setGridInc( $inc, [ $subInc = null]  )

Add the gridlines

Parameters:
   $inc: 
   $subInc: 

API Tags:
See:  SMap_Layer_Grid::$subInc
See:  SMap_Layer_Grid::$inc


[ Top ]

Documentation generated on Mon, 09 Apr 2007 18:53:15 -0500 by phpDocumentor 1.3.0