http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73004
Revision: 73004
Author: jeroendedauw
Date: 2010-09-14 18:42:49 +0000 (Tue, 14 Sep 2010)
Log Message:
-----------
Minor doc improvement
Modified Paths:
--------------
trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
Modified: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
===================================================================
--- trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
2010-09-14 18:37:38 UTC (rev 73003)
+++ trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
2010-09-14 18:42:49 UTC (rev 73004)
@@ -297,7 +297,6 @@
$label
);
-
$text = $parser->parse( '{{' .
implode( '|', $segments ) . '}}', $wgTitle, new ParserOptions() )->getText();
}
Modified: trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
===================================================================
--- trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
2010-09-14 18:37:38 UTC (rev 73003)
+++ trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
2010-09-14 18:42:49 UTC (rev 73004)
@@ -1,33 +1,29 @@
<?php
/**
- * File holding the SMAreaValueDescription class.
- *
- * @file SM_AreaValueDescription.php
- * @ingroup SemanticMaps
- *
- * @author Jeroen De Dauw
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( 'Not an entry point.' );
-}
-
-/**
* Description of a geographical area defined by a coordinates set and a
distance to the bounds.
* The bounds are a 'rectangle' (but bend due to the earhs curvature), as the
resulting query
* would otherwise be to resource intensive.
*
+ * @since 0.6
+ *
+ * @file SM_AreaValueDescription.php
+ * @ingroup SemanticMaps
+ *
* @author Jeroen De Dauw
*
* TODO: would be awesome to use Spatial Extensions to select coordinates
- *
- * @since 0.6
- *
- * @ingroup SemanticMaps
*/
class SMAreaValueDescription extends SMWValueDescription {
- protected $mBounds = false;
+
+ /**
+ * Associative array containing the bounds of the area, or false when
not set.
+ *
+ * @since 0.6
+ *
+ * @var mixed
+ */
+ protected $bounds = false;
/**
* Constructor.
@@ -56,7 +52,7 @@
* @param string $radius
*/
protected function calculateBounds( SMGeoCoordsValue $dataValue,
$radius ) {
- $this->mBounds = self::getBoundingBox(
+ $this->bounds = self::getBoundingBox(
$dataValue->getCoordinateSet(),
MapsDistanceParser::parseDistance( $radius )
);
@@ -106,7 +102,7 @@
* @return array
*/
public function getBounds() {
- return $this->mBounds;
+ return $this->bounds;
}
/**
@@ -134,17 +130,13 @@
return false;
}
- $boundingBox = $this->getBounds();
-
- $north = $dbs->addQuotes( $boundingBox['north'] );
- $east = $dbs->addQuotes( $boundingBox['east'] );
- $south = $dbs->addQuotes( $boundingBox['south'] );
- $west = $dbs->addQuotes( $boundingBox['west'] );
+ $north = $dbs->addQuotes( $this->bounds['north'] );
+ $east = $dbs->addQuotes( $this->bounds['east'] );
+ $south = $dbs->addQuotes( $this->bounds['south'] );
+ $west = $dbs->addQuotes( $this->bounds['west'] );
$isEq = $this->getComparator() == SMW_CMP_EQ;
-
-
if ( $smgUseSpatialExtensions ) {
// TODO
$sql = '';
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs