r74992 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74991‎ | r74992 | r74993 >
Date:01:29, 19 October 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Coordinates are floats, not strings
Modified paths:
  • /trunk/extensions/SemanticMaps/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php (modified) (history)
  • /trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php (modified) (history)
  • /trunk/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayersQP.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/RELEASE-NOTES
@@ -18,6 +18,8 @@
1919
2020 * Support for images without namespace prefix in the statispoints parameter in map ask queries.
2121
 22+* Fixed several issue with the OpenLayers form input.
 23+
2224 === Semantic Maps 0.7 ===
2325 (2010-10-15)
2426
Index: trunk/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayersQP.php
@@ -33,7 +33,7 @@
3434 ),
3535 wfMsg( 'maps-loading-map' )
3636 );
37 -
 37+
3838 $this->service->addLayerDependencies( $this->layers[1] );
3939
4040 $langCode = $wgLang->getCode();
Index: trunk/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php
@@ -221,8 +221,8 @@
222222 // var_dump($args);exit;
223223 }
224224 else {
225 - $this->coordinateSet['lat'] = $args[0];
226 - $this->coordinateSet['lon'] = $args[1];
 225+ $this->coordinateSet['lat'] = (float)$args[0];
 226+ $this->coordinateSet['lon'] = (float)$args[1];
227227 }
228228
229229 $this->m_caption = MapsCoordinateParser::formatCoordinates(
Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php
@@ -255,6 +255,11 @@
256256 }
257257 }
258258
 259+ /**
 260+ * Adds the static locations (specified via the staticlocations parameter) to the map.
 261+ *
 262+ * @since 0.7
 263+ */
259264 protected function addStaticLocations() {
260265 global $wgTitle;
261266

Status & tagging log