Index: trunk/extensions/SemanticMaps/SemanticMaps.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | die( 'Not an entry point.' ); |
25 | 25 | } |
26 | 26 | |
27 | | -define('SM_VERSION', '0.4.2 a1'); |
| 27 | +define('SM_VERSION', '0.4.2 a2'); |
28 | 28 | |
29 | 29 | $smgScriptPath = $wgScriptPath . '/extensions/SemanticMaps'; |
30 | 30 | $smgIP = $IP . '/extensions/SemanticMaps'; |
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFunctions.js |
— | — | @@ -15,8 +15,8 @@ |
16 | 16 | if (GBrowserIsCompatible()) { |
17 | 17 | mapOptions.centre = new GLatLng(mapOptions.lat, mapOptions.lon); |
18 | 18 | 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 | + |
21 | 21 | // Show a starting marker only if marker coordinates are provided |
22 | 22 | if (marker_lat != null && marker_lon != null) { |
23 | 23 | map.addOverlay(new GMarker(new GLatLng(marker_lat, marker_lon))); |
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php |
— | — | @@ -63,6 +63,8 @@ |
64 | 64 | |
65 | 65 | $this->controls = MapsGoogleMapsUtils::createControlsString($this->controls); |
66 | 66 | |
| 67 | + $onloadFunctions = MapsGoogleMapsUtils::addOverlayOutput($this->output, $this->mapName, $this->overlays, $this->controls); |
| 68 | + |
67 | 69 | $this->autozoom = MapsGoogleMapsUtils::getAutozoomJSValue($this->autozoom); |
68 | 70 | |
69 | 71 | $markerItems = array(); |
— | — | @@ -106,6 +108,7 @@ |
107 | 109 | |
108 | 110 | END; |
109 | 111 | |
| 112 | + $this->output .= $onloadFunctions; |
110 | 113 | } |
111 | 114 | |
112 | 115 | |
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php |
— | — | @@ -81,6 +81,11 @@ |
82 | 82 | |
83 | 83 | $this->controls = MapsGoogleMapsUtils::createControlsString($this->controls); |
84 | 84 | |
| 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 | + |
85 | 90 | $this->types = explode(",", $this->types); |
86 | 91 | |
87 | 92 | $typesString = MapsGoogleMapsUtils::createTypesString($this->types, $enableEarth); |
— | — | @@ -108,7 +113,7 @@ |
109 | 114 | $this->marker_lon |
110 | 115 | ) |
111 | 116 | ); |
112 | | - /*]]>*/</script>"; |
| 117 | + /*]]>*/</script>"; |
113 | 118 | } |
114 | 119 | |
115 | 120 | /** |