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

Class: SMap_Layer_Images

Source Location: /SMap/Layer.php

Class SMap_Layer_Images

Class Overview

Layers a set of images

Images are intended to join at the edges, overlapping images are not defined. Images can also wrap (around a globe, for example).

This is a lightweight class and is not intended for compositing thousands of images. For that, you may want something database backed.

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

SMap_Layer
   |
   --SMap_Layer_Images

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   $images   Set of images to be layered

[ Top ]
Method Summary
void   addImage()   Add an image to the set of images
array   getImgObjs()   Opens image(s) within a boundary
array   getMapObjs()   We have nothing to add to a (text) tile

[ Top ]
Properties
array   $images = array() [line 1014]

Set of images to be layered

You are encouraged to subclass this and fill in these indicies manually. It should run faster than having to load images each the class is used.

Indicies: ['x_px'], ['y_px'], ['type'], ['fname'], and ['bounds']

API Tags:
Access:  protected


[ Top ]
Methods
addImage  [line 1030]

  void addImage( array $files, array $bounds  )

Add an image to the set of images

I would suggest that you try using this method when setting up your server. When you have the bugs worked out, subclass this and hardcode all of your GD2 images with appropriate zoom levels into $this->images. It should run faster.

The array of files should have zoom levels for keys and file names for strings.

Parameters:
array   $files:  Files
array   $bounds:  Boundary placement

API Tags:
Access:  public


[ Top ]
getImgObjs  [line 1091]

  array getImgObjs( SMap_View $view, SMap_Tile $tile  )

Opens image(s) within a boundary

Creates SMap_Object_Area_Raster objects to represent all of the images that are part of this layer.

Parameters:
object The   $view:  view we are rendering for
object The   $tile:  destination tile

API Tags:
Return:  A raster object
Access:  public


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

[ Top ]
getMapObjs  [line 1077]

  array getMapObjs( SMap_View $view, SMap_Tile $tile  )

We have nothing to add to a (text) tile

Parameters:
object SMap_Tile   $view: 
SMap_Tile   $tile: 

API Tags:
Return:  Empty array
Access:  public


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

[ Top ]

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