Plugins

# Class: ToolTipsService Source Location: /plugins/toolTips/client/ToolTipsService.php
### Class Overview
ToolTips AJAX Service | ### Variables $lastDb $layerResults $mapScale $queryableLayers $smarty $x $y | ### Methods __construct addByXyQueryableLayers addLayerResult addLayerResults addQueryableLayer copyLayerGroupsConfig createQueryableLayer getDb getLastMapRequest getLastMapResult getLastScale getLayerResult getQueryableLayer getResponse getSelectedLayers getSmarty queryLayers queryLayersByXy renderResults run setQueryableLayerMembers
### Class Details [line 33] ToolTips AJAX Service [ Top ] ### Class Variables #### $lastDb = [line 75] Last instancied PEAR::DB object; for reusing DB object #### Tags:
var: | array of string
access: | protected
Type: | array
[ Top ] #### $layerResults = array() [line 51] Results for queried layers #### Tags:
var: | array of LayerResult
access: | protected
Type: | array
[ Top ] #### $mapScale = [line 69] Current geographic scale (geographic unit per pixel) #### Tags:
access: | protected
Type: | float
[ Top ] #### $queryableLayers = array() [line 45] Queryable layers and their returned attributes #### Tags:
var: | array of QueryableLayer
access: | protected
Type: | array
[ Top ] #### $smarty = [line 39] Queryable layers and their returned attributes #### Tags:
var: | Smarty_Plugin instance for toolTips
access: | protected
Type: | Smarty_Plugin
[ Top ] #### $x = [line 57] X coordinate for the query (geographic) #### Tags:
access: | protected
Type: | float
[ Top ] #### $y = [line 63] Y coordinate for the query (geographic) #### Tags:
access: | protected
Type: | float
[ Top ] ### Class Methods ### constructor __construct [line 81]
`ToolTipsService __construct( Cartoclient $cartoclient)`
Constructor #### Tags:
access: | public
#### Parameters:
Cartoclient | $cartoclient |
[ Top ] ### method addByXyQueryableLayers [line 137]
`void addByXyQueryableLayers( stdClass $layers)`
Adds ByXyQueryableLayer with a given list of layers. #### Tags:
access: | protected
#### Parameters:
stdClass | $layers |
[ Top ] ### method addLayerResult [line 328]
`void addLayerResult( LayerResult $layerResult)`
#### Tags:
access: | protected
#### Parameters:
LayerResult | $layerResult |
[ Top ] ### method addLayerResults [line 339]
`void addLayerResults( array $layerResults)`
#### Tags:
access: | protected
#### Parameters:
array | $layerResults | array of LayerResult
[ Top ] ### method addQueryableLayer [line 311]
`void addQueryableLayer( QueryableLayer $queryableLayer)`
Adds the given QueryableLayer to the toolTipsService queryableLayers array #### Tags:
access: | protected
#### Parameters:
QueryableLayer | $queryableLayer |
[ Top ] ### method copyLayerGroupsConfig [line 104]
`void copyLayerGroupsConfig( layerId $config)`
Copies config for all layers of each layer group #### Tags:
access: | protected
#### Parameters:
layerId | $config |
[ Top ] ### method createQueryableLayer [line 156]
`QueryableLayer createQueryableLayer( string $layerId, string $queryableLayerClass)`
Creates an object of the class matching the given layer Id, if possible. #### Tags:
access: | protected
#### Parameters:
string | $layerId | layer Id
string | $queryableLayerClass | base QueryableLayer class to extend
[ Top ] ### method getDb [line 301]
`PEAR::DB getDb( string $layerId)`
Returns a PEAR::DB connection relative to the given layer properties. #### Tags:
return: | DB connection for the given layerId
access: | protected
#### Parameters:
string | $layerId | layerId Id of the layer whose DSN is to be returned
[ Top ] ### method getLastMapRequest [line 228]
`MapRequest getLastMapRequest( )`
Returns session-saved last MapRequest. #### Tags:
access: | protected
[ Top ] ### method getLastMapResult [line 245]
`MapResult getLastMapResult( )`
Returns session-saved last MapResult. #### Tags:
access: | protected
[ Top ] ### method getLastScale [line 259]
`float getLastScale( )`
#### Tags:
return: | scale from last session-saved MapResult.
access: | protected
[ Top ] ### method getLayerResult [line 354]
`LayerResult getLayerResult( string $layerId)`
Returns the results related to the given layer. #### Tags:
access: | protected
#### Parameters:
string | $layerId | layerId
[ Top ] ### method getQueryableLayer [line 320]
`array getQueryableLayer( string $layerId)`
Gives the list of queryableLayers #### Tags:
access: | protected
#### Parameters:
string | $layerId |
[ Top ] ### method getResponse [line 439]
`array getResponse( )`
#### Tags:
return: | array of layersHtmlResult
access: | public
[ Top ] ### method getSelectedLayers [line 363]
`array getSelectedLayers( )`
Retrieves the list of selected layers. #### Tags:
access: | public
[ Top ] ### method getSmarty [line 277]
`Smarty_Cartoclient getSmarty( )`
Returns the Smarty template object used for template rendering. It may be used by plugins if they want to override the template display. #### Tags:
access: | public
[ Top ] ### method queryLayers [line 371]
`void queryLayers( )`
Queries all selected layers. #### Tags:
access: | protected
[ Top ] ### method queryLayersByXy [line 385]
`void queryLayersByXy( float $geoX, float $geoY)`
Queries all selected layers with given coordinates #### Tags:
access: | protected
#### Parameters:
float | $geoX | X coord
float | $geoY | Y coord
[ Top ] ### method renderResults [line 429]
`void renderResults( )`
Sets the HTML result for each layer. #### Tags:
access: | protected
[ Top ] ### method run [line 291]
`void run( )`
Runs the query method and renders the results #### Tags:
access: | public
[ Top ] ### method setQueryableLayerMembers [line 177]
`void setQueryableLayerMembers( QueryableLayer $queryableLayer, stdClass $layer, string $layerId)`
Common settings of ByXyQueryableLayers and ByIdQueryableLayers. #### Tags:
access: | protected
#### Parameters:
QueryableLayer | $queryableLayer | target object
stdClass | $layer | source object, retrieved from config
string | $layerId | layerId
[ Top ] Documentation generated on Fri, 21 Sep 2007 13:31:10 +0200 by phpDocumentor 1.3.0RC3