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

Class: SMap

Source Location: /SMap.php

Class SMap

Class Overview

Inetrface for the main mapping functions

The SMap is the object which binds all the mapping objects together. Kind of like The One Ring.

Located in /SMap.php [line 107]



		
				Author(s):
		
Information Tags:
Link:  http://en.wikipedia.org/wiki/One_Ring

Properties

Methods

[ Top ]
Constant Summary
MAXX  
MAXY   Indexes for the bounds
MINX  
MINY  

[ Top ]
Property Summary
array   $bounds   Save the view bounds
mixed   $data   The data that this will be pulled from
mixed   $form   The form that will be used to display the map view(s) and process input
mixed   $geo   Geography centric calculations
string   $key   The map's key
mixed   $lang   Language strings
string   $langKey   The language key
array   $scale   What is the scale in each direction?
integer   $tilesX   How many tiles are we viewing?
mixed   $tilesY  
mixed   $views   The views that this controller controls
array   $visibleLayers   The layers that are currently visible
array   $wrap   Wrapping info
integer   $zoom   What zoom level are we at?

[ Top ]
Method Summary
static object The   createView()   Creates a view
static string   getOption()   Get a global option
static void   setOption()   Set a global option
object The   addView()   Adds a view
void   dispTileImg()   Display a map tile image with appropriate headers.
string   getViewXHTML()   Gets XHTML for a map view window
mixed   handleImageMap()   Handle a possible imagemap click
void   initRWDir()   Init a folder
string   mapIntersect()   Find if the click matches the area map
SMap   __construct()   Constructs with the form and data objects that will be used
mixed   __get()   Access useful vars read-only

[ Top ]
Properties
array   $bounds [line 213]

Save the view bounds

API Tags:
Access:  protected


[ Top ]
mixed   $data [line 133]

The data that this will be pulled from

API Tags:
Access:  protected
See:  SMap_Data


[ Top ]
mixed   $form [line 126]

The form that will be used to display the map view(s) and process input

API Tags:
Access:  protected
See:  SMap_Form


[ Top ]
mixed   $geo [line 143]

Geography centric calculations

Anything that isn't in the native X,Y system should be passed through these functions

API Tags:
Access:  protected
See:  SMap_Geo


[ Top ]
string   $key [line 182]

The map's key

Generate it now so we don't have to later.

API Tags:
Access:  protected


[ Top ]
mixed   $lang [line 150]

Language strings

API Tags:
Access:  protected
See:  SMap_Lang


[ Top ]
string   $langKey [line 189]

The language key

API Tags:
Access:  protected


[ Top ]
array   $scale [line 206]

What is the scale in each direction?

This is SMap Units per one pixel.

API Tags:
Access:  protected


[ Top ]
integer   $tilesX [line 196]

How many tiles are we viewing?

API Tags:
Access:  protected


[ Top ]
mixed   $tilesY [line 197]
API Tags:
Access:  protected


[ Top ]
mixed   $views = array() [line 159]

The views that this controller controls

The main view is at index 0.

API Tags:
Usedby:  SMap::getViewXHTML()
Access:  protected
See:  SMap_View


[ Top ]
array   $visibleLayers [line 166]

The layers that are currently visible

API Tags:
Access:  protected


[ Top ]
array   $wrap [line 221]

Wrapping info

API Tags:
Access:  protected
See:  SMap_Geo::getWrap()


[ Top ]
integer   $zoom [line 173]

What zoom level are we at?

API Tags:
Access:  protected


[ Top ]
Methods
static method createView  [line 450]

  static object The createView( string $view, mixed $arg1, [ $arg2 = null], [ $arg3 = null], [ $arg4 = null], [ $arg5 = null], [ $arg6 = null], [ $arg7 = null], [ $arg8 = null], [ $arg9 = null]  )

Creates a view

Serves as a view factory. The first argument is the name of a view that is registered with, and the rest of the arguments are passed to the view.

Parameters:
string   $view:  View name
mixed   $arg1:  Additional arguments...
   $arg2: 
   $arg3: 
   $arg4: 
   $arg5: 
   $arg6: 
   $arg7: 
   $arg8: 
   $arg9: 

API Tags:
Return:  created view
Usedby:  SMap::addView()
Access:  public
Uses:  SMap_View::__construct()


[ Top ]
static method getOption  [line 674]

  static string getOption( string $name  )

Get a global option

All available options are pre-set in the $options array, so we will be avoiding some frusteration if we throw an error on a bad option selection. Otherwise, we could think that we are retrieving a null value, but we have just misspelled the index.

Parameters:
string   $name:  Option name

API Tags:
Return:  Option value
Access:  public
Uses:  $options


[ Top ]
static method setOption  [line 654]

  static void setOption( string $name, string $value  )

Set a global option

All available options are pre-set in the $options array, so we will be avoiding some frusteration if we throw an error on a bad option selection. Otherwise, we could think that we are retrieving a null value, but we have just misspelled the index.

Parameters:
string   $name:  Option name
string   $value:  Option value

API Tags:
Access:  public
Uses:  $options


[ Top ]
addView  [line 417]

  object The addView( mixed $view, [mixed $arg1 = null], [mixed $arg2 = null], [ $arg3 = null], [ $arg4 = null], [ $arg5 = null], [ $arg6 = null], [ $arg7 = null], [ $arg8 = null]  )

Adds a view

The main view is always stored at index 0. Throws an exception if there is already a view at that index.

Parameters:
mixed   $view:  SMap_View subclass or view to create
mixed   $arg1:  Passed to the view constructor, normally a View ID
mixed   $arg2:  Additional arguments passed to view constructor
   $arg3: 
   $arg4: 
   $arg5: 
   $arg6: 
   $arg7: 
   $arg8: 

API Tags:
Return:  added view
Access:  public
Uses:  SMap::createView()
See:  SMap_View


[ Top ]
dispTileImg  [line 488]

  void dispTileImg( )

Display a map tile image with appropriate headers.

This displays the image itself, and should be called from a script expecting a dump of the image. Caching is handled internally. The ini value of 'display_errors' is unset so an image is always displayed. For errors, please look in your log file.


API Tags:
Access:  public
Uses:  SMap_View_Raster::dispTileImg()
Uses:  SMap_View_Raster
Uses:  SMap_Tile


[ Top ]
getViewXHTML  [line 388]

  string getViewXHTML( [integer $viewId = 0]  )

Gets XHTML for a map view window

The main map view is always stored in index 0

Parameters:
integer   $viewId:  Index of view

API Tags:
Return:  XHTML
Access:  public
Uses:  SMap_View::getXHTML()
Uses:  SMap_View::getTiles()
Uses:  SMap_Form::getMapVars()
Uses:  SMap::$views


[ Top ]
handleImageMap  [line 520]

  mixed handleImageMap( )

Handle a possible imagemap click

Handle the possibility that the user clicked on a server-side image map.


API Tags:
Return:  Clicked URL or false
Access:  public
Uses:  SMap_View::getTiles()
Uses:  SMap_Tile::getImageMap()
Uses:  SMap_Form::getClickCoords()
Uses:  SMap::mapIntersect()


[ Top ]
initRWDir  [line 348]

  void initRWDir( string $dir  )

Init a folder

Parameters:
string   $dir:  Dir name

API Tags:
Usedby:  SMap::__construct()
Access:  protected


[ Top ]
mapIntersect  [line 583]

  string mapIntersect( array $map, array $coords  )

Find if the click matches the area map

Parameters:
array   $map:  Coordinate/URL set
array   $coords:  Click coordinates

API Tags:
Return:  URL or false
Usedby:  SMap::handleImageMap()
Access:  protected


[ Top ]
Constructor __construct  [line 305]

  SMap __construct( SMap_Form $form, SMap_Data $data, SMap_Geo $geo, SMap_Lang $lang  )

Constructs with the form and data objects that will be used

Parameters:
object SMap_Form   $form:  subclass
object SMap_Data   $data:  subclass
object SMap_Geo   $geo:  subclass
object SMap_Lang   $lang:  subclass

API Tags:
Uses:  SMap_Geo::zoomFctr()
Uses:  SMap_Util::genMapKey()
Uses:  SMap_Geo::getWrap()
Uses:  SMap_Form::getTileVars()
Uses:  SMap_Form::getBoundVars()
Uses:  SMap_Form::getMapVars()
Uses:  SMap::initRWDir()


[ Top ]
__get  [line 368]

  mixed __get( string $nm  )

Access useful vars read-only

Parameters:
string   $nm:  Name of member

API Tags:
Return:  Value of member
Access:  public


[ Top ]
Constants
MAXX = 2 [line 117]
API Tags:
Usedby:  SMap_Form::getBoundVars()


[ Top ]
MAXY = 1 [line 116]

Indexes for the bounds

These are used to define a rectangle on the map. The rectangle is commonly some sort of viewport, or some sort of clickable label.

API Tags:
Usedby:  SMap_Form::getBoundVars()


[ Top ]
MINX = 8 [line 119]
API Tags:
Usedby:  SMap_Form::getBoundVars()


[ Top ]
MINY = 4 [line 118]
API Tags:
Usedby:  SMap_Form::getBoundVars()


[ Top ]

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