CorePlugins

# Class: ClientLocation Source Location: /coreplugins/location/client/ClientLocation.php
### Class Overview
    PluginBase
       |
       --ClientPlugin
          |
          --ClientLocation
Client part of Location plugin | ### Variables $fullExtent $locationRequest $locationResult $locationState $log $scales $shortcuts $smarty | ### Constants TOOL_FULLEXTENT TOOL_PAN TOOL_ZOOMIN TOOL_ZOOMOUT | ### Methods __construct adjustExportMapRequest ajaxGetPluginResponse ajaxHandleAction buildRequest buildZoomPointRequest createSession drawIdRecenter drawRecenter drawScales drawShortcuts getCurrentScale getLocation getLocationInformation getShortcuts getTools getZoomInFactor handleApplicationTool handleBboxRecenter handleFullExtent handleHttpGetRequest handleHttpPostRequest handleIdRecenter handleInit handleKeymapButton handleKeymapTool handleMainmapTool handlePanButtons handleRecenterScales handleResult handleShortcuts initializeResult loadSession panDirectionToFactor renderForm renderFormPrepare saveSession
### Child classes: Client part of Location plugin, project testproject ClientTestMainLocation | ### Inherited Constants #### Class: ClientPlugin ClientPlugin::ENABLE_LEVEL_FULL ClientPlugin::ENABLE_LEVEL_LOAD ClientPlugin::ENABLE_LEVEL_PROCESS ClientPlugin::ENABLE_LEVEL_SERVERCALL | ### Inherited Variables #### Class: ClientPlugin ClientPlugin::$cartoclient ClientPlugin::$config ClientPlugin::$enabledLevel #### Class: PluginBase PluginBase::$basePath PluginBase::$name PluginBase::$overriddenRequest | ### Inherited Methods #### Class: ClientPlugin ClientPlugin::__construct() Constructor ClientPlugin::checkBool() Checks if variable $variable has a boolean (0 or 1) value $value. ClientPlugin::checkInt() Checks if variable $variable has an integer positive or zero value $value. ClientPlugin::checkNumeric() Checks if variable $variable has a numeric value $value. ClientPlugin::disable() Sets the enable level to ClientPlugin::ENABLE_LEVEL_SERVERCALL. ClientPlugin::enable() Sets the enable level to ClientPlugin::ENABLE_LEVEL_FULL. ClientPlugin::getCartoclient() ClientPlugin::getConfig() ClientPlugin::getEnabledLevel() Returns the enable level. ClientPlugin::getHttpValue() Returns the user-submitted $key data if it is set. ClientPlugin::initializeConfig() Initializes plugin configuration ClientPlugin::isEnabledAtLevel() Sets the enable level to ClientPlugin::ENABLE_LEVEL_FULL. ClientPlugin::setEnableLevel() Sets the enable level (to be used with the AJAX mode). #### Class: PluginBase PluginBase::__construct() Constructor PluginBase::account() Records an accounting message for plugins PluginBase::getBasePath() PluginBase::getExtendedName() PluginBase::getName() PluginBase::getRequest() Get plugin's request or result out of MapRequest or MapResult PluginBase::initialize() Plugin initialization (can be extended in custom plugins) PluginBase::initializeConfig() Initializes plugin PluginBase::preInitialize() Plugin pre initialization. In most cases, plugins should use PluginBase::replacePlugin() Returns name of parent plugin in case of plugin extension PluginBase::setBasePath() PluginBase::setExtendedName() PluginBase::setName()
### Class Details [line 53] Client part of Location plugin [ Top ] ### Class Variables #### $fullExtent = [line 90] #### Tags:
access: | protected
Type: | Bbox
[ Top ] #### $locationRequest = [line 70] #### Tags:
access: | protected
Type: | LocationRequest
[ Top ] #### $locationResult = [line 75] #### Tags:
access: | protected
Type: | LocationResult
[ Top ] #### $locationState = [line 65] #### Tags:
access: | protected
Type: | LocationState
[ Top ] #### $log = [line 60] #### Tags:
access: | private
Type: | Logger
Overrides: | Array
[ Top ] #### $scales = [line 80] #### Tags:
access: | protected
Type: | array
[ Top ] #### $shortcuts = [line 85] #### Tags:
access: | protected
Type: | array
[ Top ] #### $smarty = [line 103] #### Tags:
access: | protected
Type: | Smarty_Plugin
[ Top ] ### Class Methods ### constructor __construct [line 108]
`ClientLocation __construct( )`
Constructor #### Tags:
access: | public
Overrides ClientPlugin::__construct() (Constructor) [ Top ] ### method adjustExportMapRequest [line 967]
`void adjustExportMapRequest( ExportConfiguration $configuration, MapRequest $mapRequest)`
#### Tags:
access: | public
see: | Exportable::adjustExportMapRequest()
[ Top ] ### method ajaxGetPluginResponse [line 922]
`void ajaxGetPluginResponse( AjaxPluginResponse $ajaxPluginResponse)`
#### Tags:
access: | public
see: | Ajaxable::ajaxGetPluginResponse() FIXME: when all the values in the $assignArray are to be assigned, 1354
[ Top ] ### method ajaxHandleAction [line 935]
`void ajaxHandleAction( mixed $actionName, PluginEnabler $pluginEnabler)`
#### Tags:
access: | public
see: | Ajaxable::ajaxHandleAction()
[ Top ] ### method buildRequest [line 768]
`void buildRequest( )`
#### Tags:
access: | public
see: | ServerCaller::buildRequest()
Overridden in child classes as: ClientProjectLocation::buildRequest() [ Top ] ### method buildZoomPointRequest [line 684]
`LocationRequest buildZoomPointRequest( string $zoomType, Point $point, [double $zoomFactor = 0], [double $scale = 0])`
Constructs a ZoomPointLocationRequest #### Tags:
access: | protected
#### Parameters:
string | $zoomType |
Point | $point |
double | $zoomFactor |
double | $scale |
[ Top ] ### method createSession [line 573]
`void createSession( MapInfo $mapInfo, InitialMapState $initialMapState)`
#### Tags:
access: | public
see: | Sessionable::createSession()
[ Top ] ### method drawIdRecenter [line 399]
`string drawIdRecenter( )`
Draws recenter on Ids form #### Tags:
access: | protected
[ Top ] ### method drawRecenter [line 303]
`string drawRecenter( )`
Draws recenter form #### Tags:
access: | protected
[ Top ] ### method drawScales [line 312]
`string drawScales( )`
Draws scales form #### Tags:
access: | protected
[ Top ] ### method drawShortcuts [line 474]
`string drawShortcuts( )`
Draws shortcuts form #### Tags:
access: | protected
[ Top ] ### method getCurrentScale [line 802]
`float getCurrentScale( )`
Returns current scale #### Tags:
access: | public
[ Top ] ### method getLocation [line 593]
`Bbox getLocation( )`
Returns current bbox #### Tags:
access: | public
[ Top ] ### method getLocationInformation [line 829]
`string getLocationInformation( )`
Returns a string with some location information (scale, bbox, etc.) #### Tags:
access: | protected
[ Top ] ### method getShortcuts [line 585]
`array getShortcuts( )`
Returns shortcuts #### Tags:
return: | array of LocationShortcut
access: | public
[ Top ] ### method getTools [line 752]
`void getTools( )`
#### Tags:
access: | public
see: | ToolProvider::getTools()
[ Top ] ### method getZoomInFactor [line 661]
`double getZoomInFactor( Rectangle $rectangle)`
Returns zoom factor depending on selected rectangle #### Tags:
access: | protected
#### Parameters:
Rectangle | $rectangle |
[ Top ] ### method handleApplicationTool [line 743]
`void handleApplicationTool( ToolDescription $tool)`
#### Tags:
access: | public
see: | ToolProvider::handleApplicationTool()
[ Top ] ### method handleBboxRecenter [line 495]
`LocationRequest handleBboxRecenter( array $request, [boolean $check = false])`
Handles recenter on bbox HTTP request #### Tags:
access: | protected
#### Parameters:
array | $request | HTTP request
boolean | $check |
[ Top ] ### method handleFullExtent [line 548]
`LocationRequest handleFullExtent( )`
Handles full extent #### Tags:
access: | protected
[ Top ] ### method handleHttpGetRequest [line 636]
`void handleHttpGetRequest( mixed $request)`
#### Tags:
access: | public
see: | GuiProvider::handleHttpGetRequest()
[ Top ] ### method handleHttpPostRequest [line 603]
`void handleHttpPostRequest( mixed $request)`
#### Tags:
access: | public
see: | GuiProvider::handleHttpPostRequest()
[ Top ] ### method handleIdRecenter [line 340]
`LocationRequest handleIdRecenter( array $request, [boolean $check = false])`
Handles recenter on Ids HTTP request #### Tags:
access: | protected
#### Parameters:
array | $request | HTTP request
boolean | $check |
[ Top ] ### method handleInit [line 810]
`void handleInit( mixed $locationInit)`
#### Tags:
access: | public
see: | InitUser::handleInit()
[ Top ] ### method handleKeymapButton [line 191]
`LocationRequest handleKeymapButton( )`
Handles clicks on key map #### Tags:
access: | protected
[ Top ] ### method handleKeymapTool [line 737]
`void handleKeymapTool( ToolDescription $tool, Shape $keymapShape)`
#### Tags:
access: | public
see: | ToolProvider::handleKeymapTool()
[ Top ] ### method handleMainmapTool [line 707]
`void handleMainmapTool( ToolDescription $tool, Shape $mainmapShape)`
#### Tags:
access: | public
see: | ToolProvider::handleMainmapTool()
[ Top ] ### method handlePanButtons [line 138]
`LocationRequest handlePanButtons( )`
Handles panning buttons #### Tags:
access: | protected
[ Top ] ### method handleRecenterScales [line 221]
`LocationRequest handleRecenterScales( array $request, [boolean $useDoit = true], [mixed $check = false])`
Handles recenter/scales HTTP request When useDoit parameter is true, scale is changed only if a scale selection was done on form. In this case, a form value ("doit") is set to '1' using Javascript. #### Tags:
access: | protected
#### Parameters:
array | $request | HTTP request
boolean | $useDoit |
[ Top ] ### method handleResult [line 796]
`void handleResult( mixed $locationResult)`
#### Tags:
access: | public
see: | ServerCaller::handleResult()
[ Top ] ### method handleShortcuts [line 440]
`LocationRequest handleShortcuts( array $request, [boolean $useDoit = true], [boolean $check = false])`
Handles shortcuts HTTP request #### Tags:
access: | protected
#### Parameters:
array | $request | HTTP request
boolean | $useDoit |
boolean | $check |
[ Top ] ### method initializeResult [line 788]
`void initializeResult( mixed $locationResult)`
#### Tags:
access: | public
see: | ServerCaller::initializeResult()
Overridden in child classes as: ClientProjectLocation::initializeResult() [ Top ] ### method loadSession [line 563]
`void loadSession( mixed $sessionObject)`
#### Tags:
access: | public
see: | Sessionable::loadSession()
[ Top ] ### method panDirectionToFactor [line 118]
`int panDirectionToFactor( string $panDirection)`
Transforms PanDirection orientation to increments #### Tags:
access: | protected
#### Parameters:
string | $panDirection |
[ Top ] ### method renderForm [line 910]
`void renderForm( Smarty $template)`
#### Tags:
access: | public
see: | GuiProvider::renderForm() FIXME: when all the values in the $assignArray are to be assigned, 1354
Overridden in child classes as: ClientProjectLocation::renderForm() [ Top ] ### method renderFormPrepare [line 854]
`array renderFormPrepare( )`
This method factors the plugin output for both GuiProvider::renderForm() and Ajaxable::ajaxGetPluginResponse(). #### Tags:
return: | array of variables and html code to be assigned
access: | protected
[ Top ] ### method saveSession [line 957]
`void saveSession( )`
#### Tags:
access: | public
see: | Sessionable::saveSession()
[ Top ] ### Class Constants #### TOOL_FULLEXTENT = 'fullextent' [line 98] [ Top ] #### TOOL_PAN = 'pan' [line 97] [ Top ] #### TOOL_ZOOMIN = 'zoomin' [line 95] Tool constants. [ Top ] #### TOOL_ZOOMOUT = 'zoomout' [line 96] [ Top ] Documentation generated on Fri, 21 Sep 2007 13:30:39 +0200 by phpDocumentor 1.3.0RC3