Plugins

# Class: ByXyQueryableLayer Source Location: /plugins/toolTips/client/QueryableLayer.php
### Class Overview
    ToolTipsLayerBase
       |
       --QueryableLayer
          |
          --ByXyQueryableLayer
| ### Variables $dbGeomColumnName $srid $toleranceGeo $tolerancePx | ### Methods __construct getXySqlQuery pointToBox3D queryLayerByXy setDbGeomColumnName setSrid setTolerance
### Inherited Variables #### Class: QueryableLayer QueryableLayer::$db QueryableLayer::$dbTableName QueryableLayer::$dsn #### Class: ToolTipsLayerBase ToolTipsLayerBase::$id ToolTipsLayerBase::$label ToolTipsLayerBase::$returnedAttributes ToolTipsLayerBase::$template | ### Inherited Methods #### Class: QueryableLayer QueryableLayer::__construct() Constructor QueryableLayer::filterResults() This is a hook to let child classes modify the LayerResult array before it is added to the layer results to be rendered. QueryableLayer::getDb() QueryableLayer::getDsn() Returns DSN. QueryableLayer::getReturnedAttributes() Gets the list of attributes to be returned for the current layer. QueryableLayer::newLayerResult() This method is to be redefined to use a custom (extended) QueryableLayer::setDb() Sets the PEAR::DB object for queries. QueryableLayer::setDbTableName() Sets DB table name. QueryableLayer::setDsn() Sets DSN. QueryableLayer::setReturnedAttributes() Stores the list of attributes to be returned (DB field names) #### Class: ToolTipsLayerBase ToolTipsLayerBase::__construct() Constructor ToolTipsLayerBase::getId() Gets id. ToolTipsLayerBase::getLabel() Returns label. If not defined, returns id. ToolTipsLayerBase::getTemplate() Returns the filename of the template used for current layer. ToolTipsLayerBase::setId() Sets id of the layer. ToolTipsLayerBase::setLabel() Sets label of the layer. ToolTipsLayerBase::setTemplate() Sets the template file to use for current layer.
### Class Details [line 134] [ Top ] ### Class Variables #### $dbGeomColumnName = 'the_geom' [line 152] Name of the geometry column in database the table #### Tags:
access: | protected
Type: | string
[ Top ] #### $srid = -1 [line 158] PostGIS georef SRID value for the given table #### Tags:
access: | protected
Type: | string
[ Top ] #### $toleranceGeo = [line 146] Geographic tolerance for queries (geographic unit) #### Tags:
access: | protected
Type: | float
[ Top ] #### $tolerancePx = 0 [line 140] Geographic tolerance for queries (geographic unit) #### Tags:
access: | protected
Type: | float
[ Top ] ### Class Methods ### constructor __construct [line 163]
`ByXyQueryableLayer __construct( )`
Constructor #### Tags:
access: | public
Overrides QueryableLayer::__construct() (Constructor) [ Top ] ### method getXySqlQuery [line 218]
`string getXySqlQuery( float $geoX, float $geoY, Dimension $dimension, Bbox $bbox)`
This method is able to query attributes on a single table only; if you want to perform a more complex query, this method is to be redefined in a child class. #### Tags:
return: | an SQL query
access: | protected
#### Parameters:
float | $geoX | geographic x coordinate for spatial condition
float | $geoY | geographic y coordinate for spatial condition
Dimension | $dimension | mainmap dimensions (width, height)
Bbox | $bbox | current mainmap extent
[ Top ] ### method pointToBox3D [line 198]
`string pointToBox3D( Dimension $x, float $y, float $width, Bbox $height, Bbox $bbox, [mixed $tolerance = 3])`
converts a geographical point to a Box3D using tolerance #### Tags:
access: | protected
#### Parameters:
Dimension | $x | image size
float | $y | x geo coordinate
float | $width | y geo coordinate
Bbox | $height | current bbox in geographical coordinates
tolerance | $bbox | tolerance given in pixel
[ Top ] ### method queryLayerByXy [line 255]
`array queryLayerByXy( QueryableLayer $geoX, float $geoY, Dimension $dimension, Bbox $bbox, Bbox 4)`
Returns the attributes to be returned specified in the given QueryableLayer #### Tags:
return: | array of LayerResult
access: | public
#### Parameters:
Bbox | 4 | current mainmap extent
QueryableLayer | $geoX | layer to query
float | $geoY | geographic x coordinate for spatial condition
float | $dimension | geographic y coordinate for spatial condition
Dimension | $bbox | mainmap dimensions (width, height)
[ Top ] ### method setDbGeomColumnName [line 185]
`void setDbGeomColumnName( string $dbGeomColumnName)`
Sets the name of the geometry column in the DB table. #### Tags:
access: | public
#### Parameters:
string | $dbGeomColumnName |
[ Top ] ### method setSrid [line 177]
`void setSrid( string $srid)`
Sets the srid of the geometry column in the DB table. #### Tags:
access: | public
#### Parameters:
string | $srid |
[ Top ] ### method setTolerance [line 169]
`void setTolerance( integer $tolerance)`
Sets the tolerance. #### Tags:
access: | public
#### Parameters:
integer | $tolerance | tolerance in pixels
[ Top ] Documentation generated on Fri, 21 Sep 2007 13:30:58 +0200 by phpDocumentor 1.3.0RC3