r58936 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58935‎ | r58936 | r58937 >
Date:03:23, 12 November 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFunctions.js (modified) (history)
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php (modified) (history)
  • /trunk/extensions/SemanticMaps/SemanticMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/SemanticMaps.php
@@ -23,7 +23,7 @@
2424 die( 'Not an entry point.' );
2525 }
2626
27 -define('SM_VERSION', '0.4.2 a1');
 27+define('SM_VERSION', '0.4.2 a2');
2828
2929 $smgScriptPath = $wgScriptPath . '/extensions/SemanticMaps';
3030 $smgIP = $IP . '/extensions/SemanticMaps';
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFunctions.js
@@ -15,8 +15,8 @@
1616 if (GBrowserIsCompatible()) {
1717 mapOptions.centre = new GLatLng(mapOptions.lat, mapOptions.lon);
1818 mapOptions.size = new GSize(mapOptions.width, mapOptions.height);
19 - var map = createGoogleMap(document.getElementById(mapName), mapOptions, [getGMarkerData(marker_lat, marker_lon, '', '', '')]);
20 -
 19+ var map = createGoogleMap(mapName, mapOptions, [getGMarkerData(marker_lat, marker_lon, '', '', '')]);
 20+
2121 // Show a starting marker only if marker coordinates are provided
2222 if (marker_lat != null && marker_lon != null) {
2323 map.addOverlay(new GMarker(new GLatLng(marker_lat, marker_lon)));
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php
@@ -63,6 +63,8 @@
6464
6565 $this->controls = MapsGoogleMapsUtils::createControlsString($this->controls);
6666
 67+ $onloadFunctions = MapsGoogleMapsUtils::addOverlayOutput($this->output, $this->mapName, $this->overlays, $this->controls);
 68+
6769 $this->autozoom = MapsGoogleMapsUtils::getAutozoomJSValue($this->autozoom);
6870
6971 $markerItems = array();
@@ -106,6 +108,7 @@
107109
108110 END;
109111
 112+ $this->output .= $onloadFunctions;
110113 }
111114
112115
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php
@@ -81,6 +81,11 @@
8282
8383 $this->controls = MapsGoogleMapsUtils::createControlsString($this->controls);
8484
 85+ if (in_string('overlays', $this->controls)) {
 86+ $this->controls = str_replace(",'overlays'", '', $this->controls);
 87+ $this->controls = str_replace("'overlays',", '', $this->controls);
 88+ }
 89+
8590 $this->types = explode(",", $this->types);
8691
8792 $typesString = MapsGoogleMapsUtils::createTypesString($this->types, $enableEarth);
@@ -108,7 +113,7 @@
109114 $this->marker_lon
110115 )
111116 );
112 - /*]]>*/</script>";
 117+ /*]]>*/</script>";
113118 }
114119
115120 /**

Status & tagging log