Index: trunk/extensions/Maps/ParserFunctions/DisplayPoint/Maps_BasePointMap.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | public final function displayMap(&$parser, array $params) { |
33 | 33 | $this->setMapSettings(); |
34 | 34 | |
35 | | - $coords = $this->manageMapProperties($params); |
| 35 | + $coords = $this->manageMapProperties($params, __CLASS__); |
36 | 36 | |
37 | 37 | $this->doMapServiceLoad(); |
38 | 38 | |
— | — | @@ -56,8 +56,8 @@ |
57 | 57 | * (non-PHPdoc) |
58 | 58 | * @see smw/extensions/Maps/MapsMapFeature#manageMapProperties($mapProperties, $className) |
59 | 59 | */ |
60 | | - protected function manageMapProperties($params) { |
61 | | - parent::manageMapProperties($params, __CLASS__); |
| 60 | + protected function manageMapProperties($params, $className) { |
| 61 | + parent::manageMapProperties($params, $className); |
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
Index: trunk/extensions/Maps/ParserFunctions/DisplayMap/Maps_BaseMap.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | public final function displayMap(&$parser, array $params) { |
31 | 31 | $this->setMapSettings(); |
32 | 32 | |
33 | | - $coords = $this->manageMapProperties($params); |
| 33 | + $coords = $this->manageMapProperties($params, __CLASS__); |
34 | 34 | |
35 | 35 | $this->doMapServiceLoad(); |
36 | 36 | |
— | — | @@ -48,8 +48,8 @@ |
49 | 49 | * (non-PHPdoc) |
50 | 50 | * @see smw/extensions/Maps/MapsMapFeature#manageMapProperties($mapProperties, $className) |
51 | 51 | */ |
52 | | - protected function manageMapProperties($params) { |
53 | | - parent::manageMapProperties($params, __CLASS__); |
| 52 | + protected function manageMapProperties($params, $className) { |
| 53 | + parent::manageMapProperties($params, $className); |
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | die( 'Not an entry point.' ); |
25 | 25 | } |
26 | 26 | |
27 | | -define('Maps_VERSION', '0.4.2 a1'); |
| 27 | +define('Maps_VERSION', '0.4.2 a2'); |
28 | 28 | |
29 | 29 | $egMapsScriptPath = $wgScriptPath . '/extensions/Maps'; |
30 | 30 | $egMapsIP = $IP . '/extensions/Maps'; |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php |
— | — | @@ -54,6 +54,8 @@ |
55 | 55 | |
56 | 56 | $this->controls = MapsGoogleMapsUtils::createControlsString($this->controls); |
57 | 57 | |
| 58 | + $onloadFunctions = MapsGoogleMapsUtils::addOverlayOutput($this->output, $this->mapName, $this->overlays, $this->controls); |
| 59 | + |
58 | 60 | $this->autozoom = MapsGoogleMapsUtils::getAutozoomJSValue($this->autozoom); |
59 | 61 | |
60 | 62 | $this->types = explode(",", $this->types); |
— | — | @@ -82,6 +84,8 @@ |
83 | 85 | |
84 | 86 | END; |
85 | 87 | |
| 88 | + $this->output .= $onloadFunctions; |
| 89 | + |
86 | 90 | } |
87 | 91 | |
88 | 92 | } |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsUtils.php |
— | — | @@ -54,7 +54,14 @@ |
55 | 55 | 'mars-infrared' => 'G_MARS_INFRARED_MAP', |
56 | 56 | 'G_MARS_INFRARED_MAP' => 'G_MARS_INFRARED_MAP', |
57 | 57 | ); |
58 | | - |
| 58 | + |
| 59 | + private static $overlayData = array( |
| 60 | + 'photos' => '0', |
| 61 | + 'videos' => '1', |
| 62 | + 'wikipedia' => '2', |
| 63 | + 'webcams' => '3' |
| 64 | + ); |
| 65 | + |
59 | 66 | /** |
60 | 67 | * Returns the Google Map type (defined in MapsGoogleMaps::$mapTypes) |
61 | 68 | * for the provided a general map type. When no match is found, false |
— | — | @@ -117,7 +124,7 @@ |
118 | 125 | * @param string $output |
119 | 126 | */ |
120 | 127 | public static function addGMapDependencies(&$output) { |
121 | | - global $wgJsMimeType, $wgLang; |
| 128 | + global $wgJsMimeType, $wgLang, $wgOut; |
122 | 129 | global $egGoogleMapsKey, $egMapsScriptPath, $egGoogleMapsOnThisPage, $egMapsStyleVersion; |
123 | 130 | |
124 | 131 | if (empty($egGoogleMapsOnThisPage)) { |
— | — | @@ -194,4 +201,130 @@ |
195 | 202 | } |
196 | 203 | } |
197 | 204 | |
| 205 | + /** |
| 206 | + * |
| 207 | + * |
| 208 | + * @param string $output |
| 209 | + * @param string $mapName |
| 210 | + * @return unknown_type |
| 211 | + */ |
| 212 | + public static function addOverlayOutput(&$output, $mapName, $overlays, $controls) { |
| 213 | + global $egMapsGMapOverlays, $egMapsGoogleOverlLoaded, $wgJsMimeType; |
| 214 | + |
| 215 | + // Check to see if there is an overlays control. |
| 216 | + $hasOverlayControl = in_string('overlays', $controls); |
| 217 | + |
| 218 | + $overlayNames = array_keys(self::$overlayData); |
| 219 | + |
| 220 | + // Create the overlays array, and use the default in case no overlays have been provided. |
| 221 | + if (strlen(trim($overlays)) < 1) { |
| 222 | + $overlays = $egMapsGMapOverlays; |
| 223 | + } else { |
| 224 | + MapsMapper::enforceArrayValues($overlays); |
| 225 | + $validOverlays = array(); |
| 226 | + foreach ($overlays as $overlay) { |
| 227 | + $segements = split('-', $overlay); |
| 228 | + $name = $segements[0]; |
| 229 | + |
| 230 | + if (in_array($name, $overlayNames)) { |
| 231 | + $isOn = count($segements) > 1 ? $segements[1] : '0'; |
| 232 | + $validOverlays[$name] = $isOn == '1'; |
| 233 | + } |
| 234 | + } |
| 235 | + $overlays = $validOverlays; |
| 236 | + } |
| 237 | + |
| 238 | + // If there are no overlays or there is no control to hold them, don't bother the rest. |
| 239 | + if(!$hasOverlayControl || count($overlays) < 1) return; |
| 240 | + |
| 241 | + // If the overlays JS and CSS has not yet loaded, do it. |
| 242 | + if (empty($egMapsGoogleOverlLoaded)) { |
| 243 | + $egMapsGoogleOverlLoaded = true; |
| 244 | + MapsGoogleMapsUtils::addOverlayCss($output); |
| 245 | + } |
| 246 | + |
| 247 | + // Add the inputs for the overlays. |
| 248 | + $addedOverlays = array(); |
| 249 | + $overlayHtml = ''; |
| 250 | + $onloadFunctions = ''; |
| 251 | + foreach ($overlays as $overlay => $isOn) { |
| 252 | + $overlay = strtolower($overlay); |
| 253 | + |
| 254 | + if (in_array($overlay, $overlayNames)) { |
| 255 | + if (! in_array($overlay, $addedOverlays)) { |
| 256 | + $addedOverlays[] = $overlay; |
| 257 | + $label = wfMsg('maps_' . $overlay); |
| 258 | + $urlNr = self::$overlayData[$overlay]; |
| 259 | + $overlayHtml .= "<input id='$mapName-overlay-box-$overlay' name='$mapName-overlay-box' type='checkbox' onclick='switchGLayer(GMaps[\"$mapName\"], this.checked, GOverlays[$urlNr])' /> $label <br />"; |
| 260 | + if ($isOn) { |
| 261 | + $onloadFunctions .= "<script type='$wgJsMimeType'>addOnloadHook( initiateGOverlay('$mapName-overlay-box-$overlay', '$mapName', $urlNr) );</script>"; |
| 262 | + } |
| 263 | + } |
| 264 | + } |
| 265 | + } |
| 266 | + |
| 267 | + $output .=<<<END |
| 268 | +<script type='$wgJsMimeType'>var timer_$mapName;</script> |
| 269 | +<div class='outer-more' id='$mapName-outer-more'><form action=''><div class='more-box' id='$mapName-more-box'> |
| 270 | +$overlayHtml |
| 271 | +</div></form></div> |
| 272 | +END; |
| 273 | + |
| 274 | + return $onloadFunctions; |
| 275 | + } |
| 276 | + |
| 277 | + /** |
| 278 | + * |
| 279 | + * |
| 280 | + * @param $output |
| 281 | + * @return unknown_type |
| 282 | + */ |
| 283 | + private static function addOverlayCss(&$output) { |
| 284 | + $css =<<<END |
| 285 | + |
| 286 | +<style type="text/css"> |
| 287 | +.inner-more { |
| 288 | + text-align:center; |
| 289 | + font-size:12px; |
| 290 | + background-color: #fff; |
| 291 | + color: #000; |
| 292 | + border: 1px solid #fff; |
| 293 | + border-right-color: #b0b0b0; |
| 294 | + border-bottom-color: #c0c0c0; |
| 295 | + width:7em; |
| 296 | + cursor: pointer; |
| 297 | +} |
| 298 | + |
| 299 | +.inner-more.highlight { |
| 300 | + font-weight: bold; |
| 301 | + border: 1px solid #483D8B; |
| 302 | + border-right-color: #6495ed; |
| 303 | + border-bottom-color: #6495ed; |
| 304 | +} |
| 305 | + |
| 306 | +.more-box { position:absolute; |
| 307 | + top:25px; left:0px; |
| 308 | + margin-top:-1px; |
| 309 | + font-size:12px; |
| 310 | + padding: 6px 4px; |
| 311 | + width:120px; |
| 312 | + background-color: #fff; |
| 313 | + color: #000; |
| 314 | + border: 1px solid gray; |
| 315 | + border-top:1px solid #e2e2e2; |
| 316 | + display: none; |
| 317 | + cursor:default; |
| 318 | +} |
| 319 | + |
| 320 | +.more-box.highlight { |
| 321 | + width:119px; |
| 322 | + border-width:2px; |
| 323 | +} |
| 324 | +</style> |
| 325 | + |
| 326 | +END; |
| 327 | + |
| 328 | + $output .= preg_replace('/\s+/m', ' ', $css); |
| 329 | + } |
| 330 | + |
198 | 331 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispPoint.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | * |
50 | 50 | */ |
51 | 51 | public function addSpecificMapHTML() { |
52 | | - global $wgJsMimeType; |
| 52 | + global $wgJsMimeType, $wgOut; |
53 | 53 | |
54 | 54 | $enableEarth = MapsGoogleMapsUtils::getEarthValue($this->earth); |
55 | 55 | |
— | — | @@ -56,6 +56,8 @@ |
57 | 57 | |
58 | 58 | $this->controls = MapsGoogleMapsUtils::createControlsString($this->controls); |
59 | 59 | |
| 60 | + $onloadFunctions = MapsGoogleMapsUtils::addOverlayOutput($this->output, $this->mapName, $this->overlays, $this->controls); |
| 61 | + |
60 | 62 | $this->autozoom = MapsGoogleMapsUtils::getAutozoomJSValue($this->autozoom); |
61 | 63 | |
62 | 64 | $markerItems = array(); |
— | — | @@ -67,10 +69,10 @@ |
68 | 70 | |
69 | 71 | $title = array_key_exists('title', $markerData) ? $markerData['title'] : $this->title; |
70 | 72 | $label = array_key_exists('label', $markerData) ? $markerData['label'] : $this->label; |
71 | | - |
| 73 | + |
72 | 74 | $title = str_replace("'", "\'", $title); |
73 | 75 | $label = str_replace("'", "\'", $label); |
74 | | - |
| 76 | + |
75 | 77 | $icon = array_key_exists('icon', $markerData) ? $markerData['icon'] : ''; |
76 | 78 | $markerItems[] = "getGMarkerData($lat, $lon, '$title', '$label', '$icon')"; |
77 | 79 | } |
— | — | @@ -82,7 +84,7 @@ |
83 | 85 | $typesString = MapsGoogleMapsUtils::createTypesString($this->types, $enableEarth); |
84 | 86 | |
85 | 87 | $this->output .=<<<END |
86 | | - |
| 88 | + |
87 | 89 | <div id="$this->mapName" class="$this->class" style="$this->style" ></div> |
88 | 90 | <script type="$wgJsMimeType"> /*<![CDATA[*/ |
89 | 91 | addOnloadHook( |
— | — | @@ -105,6 +107,8 @@ |
106 | 108 | |
107 | 109 | END; |
108 | 110 | |
| 111 | + $this->output .= $onloadFunctions; |
| 112 | + |
109 | 113 | } |
110 | 114 | |
111 | 115 | } |
Index: trunk/extensions/Maps/GoogleMaps/GoogleMapFunctions.js |
— | — | @@ -9,7 +9,14 @@ |
10 | 10 | * @author Jeroen De Dauw |
11 | 11 | */ |
12 | 12 | |
| 13 | +var GOverlays = [ |
| 14 | + new GLayer("com.panoramio.all"), |
| 15 | + new GLayer("com.youtube.all"), |
| 16 | + new GLayer("org.wikipedia.en"), |
| 17 | + new GLayer("com.google.webcams") |
| 18 | +]; |
13 | 19 | |
| 20 | + |
14 | 21 | /** |
15 | 22 | * Returns GMarker object on the provided location. It will show a popup baloon |
16 | 23 | * with title and label when clicked, if either of these is set. |
— | — | @@ -48,7 +55,7 @@ |
49 | 56 | if (GBrowserIsCompatible()) { |
50 | 57 | mapOptions.centre = (mapOptions.lat != null && mapOptions.lon != null) ? new GLatLng(mapOptions.lat, mapOptions.lon) : null; |
51 | 58 | mapOptions.size = new GSize(mapOptions.width, mapOptions.height); |
52 | | - return createGoogleMap(document.getElementById(mapName), mapOptions, markers); |
| 59 | + return createGoogleMap(mapName, mapOptions, markers); |
53 | 60 | } |
54 | 61 | else { |
55 | 62 | return false; |
— | — | @@ -58,20 +65,22 @@ |
59 | 66 | /** |
60 | 67 | * Returns GMap2 object with the provided properties. |
61 | 68 | */ |
62 | | -function createGoogleMap(mapElement, mapOptions, markers) { |
| 69 | +function createGoogleMap(mapName, mapOptions, markers) { |
| 70 | + var mapElement = document.getElementById(mapName); |
63 | 71 | var typesContainType = false; |
64 | 72 | |
65 | 73 | // TODO: Change labels of the moon/mars map types? |
66 | 74 | for (var i = 0; i < mapOptions.types.length; i++) { |
67 | 75 | if (mapOptions.types[i] == mapOptions.type) typesContainType = true; |
68 | 76 | } |
69 | | - |
| 77 | + |
70 | 78 | if (! typesContainType) mapOptions.types.push(mapOptions.type); |
71 | 79 | |
72 | 80 | var map = new GMap2(mapElement, {size: mapOptions.size, mapTypes: mapOptions.types}); |
73 | | - |
| 81 | + map.name = mapName; |
| 82 | + |
74 | 83 | map.setMapType(mapOptions.type); |
75 | | - |
| 84 | + |
76 | 85 | // List of GControls: http://code.google.com/apis/maps/documentation/reference.html#GControl |
77 | 86 | for (i in mapOptions.controls){ |
78 | 87 | switch (mapOptions.controls[i]) { |
— | — | @@ -92,10 +101,13 @@ |
93 | 102 | break; |
94 | 103 | case 'type' : |
95 | 104 | map.addControl(new GMapTypeControl()); |
96 | | - break; |
| 105 | + break; |
97 | 106 | case 'type-menu' : |
98 | 107 | map.addControl(new GMenuMapTypeControl()); |
99 | 108 | break; |
| 109 | + case 'overlays' : |
| 110 | + map.addControl(new MoreControl()); |
| 111 | + break; |
100 | 112 | case 'overview' : case 'overview-map' : |
101 | 113 | map.addControl(new GOverviewMapControl()); |
102 | 114 | break; |
— | — | @@ -107,29 +119,121 @@ |
108 | 120 | break; |
109 | 121 | } |
110 | 122 | } |
111 | | - |
| 123 | + |
112 | 124 | var bounds = ((mapOptions.zoom == null || mapOptions.centre == null) && markers.length > 1) ? new GLatLngBounds() : null; |
113 | | - |
| 125 | + |
114 | 126 | for (i in markers) { |
115 | 127 | var marker = markers[i]; |
116 | 128 | map.addOverlay(createGMarker(marker.point, marker.title, marker.label, marker.icon)); |
117 | 129 | if (bounds != null) bounds.extend(marker.point); |
118 | 130 | } |
119 | | - |
| 131 | + |
120 | 132 | if (bounds != null) { |
121 | 133 | map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds)); |
122 | 134 | } |
123 | | - |
| 135 | + |
124 | 136 | if (mapOptions.centre != null) map.setCenter(mapOptions.centre); |
125 | 137 | if (mapOptions.zoom != null) map.setZoom(mapOptions.zoom); |
126 | 138 | |
127 | 139 | if (mapOptions.scrollWheelZoom) map.enableScrollWheelZoom(); |
128 | | - |
| 140 | + |
129 | 141 | map.enableContinuousZoom(); |
130 | 142 | |
| 143 | + // Make the map variable available for other functions |
| 144 | + if (!window.GMaps) window.GMaps = new Object; |
| 145 | + eval("window.GMaps." + mapName + " = map;"); |
| 146 | + |
131 | 147 | return map; |
132 | 148 | } |
133 | 149 | |
134 | 150 | function getGMarkerData(lat, lon, title, label, icon) { |
135 | 151 | return {point: new GLatLng(lat, lon), title: title, label: label, icon: icon}; |
136 | 152 | } |
| 153 | + |
| 154 | +function setupCheckboxShiftClick() { return true; } |
| 155 | + |
| 156 | + |
| 157 | +function MoreControl() {}; |
| 158 | +MoreControl.prototype = new GControl(); |
| 159 | + |
| 160 | +MoreControl.prototype.initialize = function(map) { |
| 161 | + alert('ur doin it wron'); |
| 162 | + this.map = map; |
| 163 | + |
| 164 | + var more = document.getElementById(map.name + "-outer-more"); |
| 165 | + |
| 166 | + var buttonDiv = document.createElement("div"); |
| 167 | + buttonDiv.id = map.name + "-more-button"; |
| 168 | + buttonDiv.title = "Show/Hide Overlays"; |
| 169 | + buttonDiv.style.border = "1px solid black"; |
| 170 | + buttonDiv.style.width = "86px"; |
| 171 | + |
| 172 | + var textDiv = document.createElement("div"); |
| 173 | + textDiv.id = map.name + "-inner-more"; |
| 174 | + textDiv.setAttribute('class', 'inner-more'); |
| 175 | + textDiv.appendChild(document.createTextNode("Overlays")); |
| 176 | + |
| 177 | + buttonDiv.appendChild(textDiv); |
| 178 | + |
| 179 | + // Register Event handlers |
| 180 | + more.onmouseover = showGLayerbox; |
| 181 | + more.onmouseout = setGLayerboxClose; |
| 182 | + |
| 183 | + // Insert the button just after outer_more div. |
| 184 | + more.insertBefore(buttonDiv, document.getElementById(map.name + "-more-box").parentNode); |
| 185 | + |
| 186 | + // Remove the whole div from its location and reinsert it to the map. |
| 187 | + map.getContainer().appendChild(more); |
| 188 | + |
| 189 | + return more; |
| 190 | +}; |
| 191 | + |
| 192 | +MoreControl.prototype.getDefaultPosition = function() { |
| 193 | + return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 35)); |
| 194 | +}; |
| 195 | + |
| 196 | +function checkGChecked(mapName) { |
| 197 | + // Returns true if a checkbox is still checked otherwise false. |
| 198 | + var boxes = document.getElementsByName(mapName + "-overlay-box"); |
| 199 | + for(var i = 0; i < boxes.length; i++) { |
| 200 | + if(boxes[i].checked) return true; |
| 201 | + } |
| 202 | + return false; |
| 203 | +} |
| 204 | + |
| 205 | +function showGLayerbox() { |
| 206 | + var mapName = this.id.split('-')[0]; |
| 207 | + eval("if(window.timer_" + mapName + ") clearTimeout(timer_" + mapName + ");"); |
| 208 | + document.getElementById(mapName + "-more-box").style.display = "block"; |
| 209 | + var button = document.getElementById(mapName + "-inner-more"); |
| 210 | + button.style.borderBottomWidth = "4px"; |
| 211 | + button.style.borderBottomColor = "white"; |
| 212 | +} |
| 213 | + |
| 214 | + |
| 215 | +function setGLayerboxClose() { |
| 216 | + var mapName = this.id.split('-')[0]; |
| 217 | + var layerbox = document.getElementById(mapName + "-more-box"); |
| 218 | + var button = document.getElementById(mapName + "-inner-more"); |
| 219 | + var bottomColor = checkGChecked(mapName) ? "#6495ed" : "#c0c0c0"; |
| 220 | + eval("timer_" + mapName + " = window.setTimeout(function() { layerbox.style.display = 'none'; button.style.borderBottomWidth = '1px'; button.style.borderBottomColor = bottomColor; }, 400);"); |
| 221 | +} |
| 222 | + |
| 223 | +function switchGLayer(map, checked, layer) { |
| 224 | + // Function borrowed from Esa: http://esa.ilmari.googlepages.com/dropdownmenu.htm |
| 225 | + var layerbox = document.getElementById(map.name + "-more-box"); |
| 226 | + var button = document.getElementById(map.name + "-inner-more"); |
| 227 | + |
| 228 | + if(checked) { |
| 229 | + map.addOverlay(layer); |
| 230 | + } |
| 231 | + else { |
| 232 | + map.removeOverlay(layer); |
| 233 | + } |
| 234 | + |
| 235 | +} |
| 236 | + |
| 237 | +function initiateGOverlay(elementId, mapName, urlNr) { |
| 238 | + document.getElementById(elementId).checked = true; |
| 239 | + switchGLayer(GMaps[mapName], true, GOverlays[urlNr]); |
| 240 | +} |
Index: trunk/extensions/Maps/Maps.i18n.php |
— | — | @@ -15,16 +15,20 @@ |
16 | 16 | * @author Jeroen De Dauw |
17 | 17 | */ |
18 | 18 | $messages['en'] = array( |
| 19 | + // General |
19 | 20 | 'maps_name' => 'Maps', |
20 | 21 | 'maps_desc' => "Provides the ability to display coordinate data in maps, and geocode addresses ([http://wiki.bn2vs.com/wiki/Maps demo]). |
21 | 22 | Available mapping services: $1", |
| 23 | + 'maps_map' => 'Map', |
22 | 24 | |
| 25 | + // Geocoding errors |
23 | 26 | 'maps_coordinates_missing' => 'No coordinates provided for the map.', |
24 | 27 | 'maps_geocoding_failed' => 'The following {{PLURAL:$2|address|addresses}} could not be geocoded: $1. |
25 | 28 | The map cannot be displayed.', |
26 | 29 | 'maps_geocoding_failed_for' => 'The following {{PLURAL:$2|address|addresses}} could not be geocoded and {{PLURAL:$2|has|have}} been omitted from the map: |
27 | 30 | $1', |
28 | 31 | |
| 32 | + // Parameter errors. Used when strict parameter validation is turned on. |
29 | 33 | 'maps_error_parameters' => 'The following errors have been detected in your syntaxis', |
30 | 34 | 'maps_error_invalid_argument' => 'The value $1 is not valid for parameter $2.', |
31 | 35 | 'maps_error_empty_argument' => 'Parameter $1 can not have an empty value.', |
— | — | @@ -32,12 +36,18 @@ |
33 | 37 | 'maps_error_must_be_number' => 'Parameter $1 can only be a number.', |
34 | 38 | 'maps_error_ivalid_range' => 'Parameter $1 must be between $2 and $3.', |
35 | 39 | |
36 | | - 'maps_map' => 'Map', |
37 | | - |
| 40 | + // Mapping services |
38 | 41 | 'maps_googlemaps' => 'Google Maps', |
39 | 42 | 'maps_yahoomaps' => 'Yahoo! Maps', |
40 | 43 | 'maps_openlayers' => 'OpenLayers', |
41 | 44 | 'maps_osm' => 'OpenStreetMaps', |
| 45 | + |
| 46 | + // Google Maps overlays |
| 47 | + 'maps_overlays' => 'Overlays', |
| 48 | + 'maps_photos' => 'Photos', |
| 49 | + 'maps_videos' => 'Videos', |
| 50 | + 'maps_wikipedia' => 'Wikipedia', |
| 51 | + 'maps_webcams' => 'Webcams' |
42 | 52 | ); |
43 | 53 | |
44 | 54 | /** Message documentation (Message documentation) |
Index: trunk/extensions/Maps/Maps_Settings.php |
— | — | @@ -162,10 +162,15 @@ |
163 | 163 | |
164 | 164 | # Array of String. The default controls for Google Maps. This value will only be used when the user does not provide one. |
165 | 165 | # Available values: large, small, large-original, small-original, zoom, type, type-menu, overview-map, scale, nav-label |
166 | | -$egMapsGMapControls = array('large', 'scale', 'type'); |
| 166 | +$egMapsGMapControls = array('large', 'scale', 'type', 'overlays'); |
167 | 167 | |
| 168 | +# Array. The default overlays for the Google Maps overlays control, and wether they should be shown at pageload. |
| 169 | +# This value will only be used when the user does not provide one. |
| 170 | +# Available values: photos, videos, wikipedia, webcams |
| 171 | +$egMapsGMapOverlays = array('photos' => false, 'videos' => true, 'wikipedia' => true, 'webcams' => false); |
168 | 172 | |
169 | 173 | |
| 174 | + |
170 | 175 | # Yahoo maps |
171 | 176 | |
172 | 177 | # Your Yahoo! Maps API key. Required for displaying Yahoo! Maps. |