r82288 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82287‎ | r82288 | r82289 >
Date:20:08, 16 February 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Comitting KML patch by Benedikt Kämpgen
Modified paths:
  • /trunk/extensions/Maps/Maps.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps/GoogleMapFunctions.js (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps.php
@@ -36,7 +36,7 @@
3737 die( '<b>Error:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.<br />' );
3838 }
3939 else {
40 - define( 'Maps_VERSION', '0.7.5' );
 40+ define( 'Maps_VERSION', '0.7.6 alpha' );
4141
4242 // The different coordinate notations.
4343 define( 'Maps_COORDS_FLOAT', 'float' );
@@ -101,6 +101,7 @@
102102 $wgAutoloadClasses['MapsParamDimension'] = $manDir . 'Maps_ParamDimension.php';
103103 $wgAutoloadClasses['MapsParamGeoService'] = $manDir . 'Maps_ParamGeoService.php';
104104 $wgAutoloadClasses['MapsParamImage'] = $manDir . 'Maps_ParamImage.php';
 105+ $wgAutoloadClasses['MapsParamImageFull'] = $manDir . 'Maps_ParamImageFull.php';
105106 $wgAutoloadClasses['MapsParamLocation'] = $manDir . 'Maps_ParamLocation.php';
106107 $wgAutoloadClasses['MapsParamService'] = $manDir . 'Maps_ParamService.php';
107108 $wgAutoloadClasses['MapsParamZoom'] = $manDir . 'Maps_ParamZoom.php';
Index: trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMaps.php
@@ -46,6 +46,8 @@
4747 global $egMapsGoogleMapsType, $egMapsGoogleMapsTypes, $egMapsGoogleAutozoom, $egMapsGMapControls, $egMapsGMapOverlays;
4848
4949 $params['zoom']->addCriteria( new CriterionInRange( 0, 20 ) );
 50+ // Default zoom is not necessary if kml is set
 51+ //$params['zoom']->setDefault(null);
5052 $params['zoom']->setDefault( self::getDefaultZoom() );
5153
5254 $params['controls'] = new ListParameter( 'controls' );
@@ -89,8 +91,11 @@
9092
9193 $params['kml'] = new ListParameter( 'kml' );
9294 $params['kml']->setDefault( array() );
93 - $params['kml']->addManipulations( new ParamManipulationImplode( ',', "'" ) );
 95+ //do both translation and imploding
 96+ $myKMLManips = array(new MapsParamImageFull(), new ParamManipulationImplode( ',', "'" ));
 97+ $params['kml']->addManipulations( $myKMLManips);
9498
 99+
95100 $params['overlays'] = new ListParameter( 'overlays' );
96101 $params['overlays']->setDefault( $egMapsGMapOverlays );
97102 $params['overlays']->addCriteria( new CriterionGoogleOverlay( self::$overlayData ) );
Index: trunk/extensions/Maps/includes/services/GoogleMaps/GoogleMapFunctions.js
@@ -1,83 +1,87 @@
2 - /**
3 - * Javascript functions for Google Maps functionality in Maps.
4 - *
5 - * @file GoogleMapFunctions.js
6 - * @ingroup MapsGoogleMaps
7 - *
8 - * @author Robert Buzink
9 - * @author Yaron Koren
10 - * @author Jeroen De Dauw
11 - */
 2+/**
 3+ * Javascript functions for Google Maps functionality in Maps.
 4+ *
 5+ * @file GoogleMapFunctions.js
 6+ * @ingroup MapsGoogleMaps
 7+ *
 8+ * @author Robert Buzink
 9+ * @author Yaron Koren
 10+ * @author Jeroen De Dauw
 11+ */
1212
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+var GOverlays = [ new GLayer("com.panoramio.all"),
 14+ new GLayer("com.youtube.all"), new GLayer("org.wikipedia.en"),
 15+ new GLayer("com.google.webcams") ];
1916
20 -
2117 /**
2218 * Returns GMarker object on the provided location. It will show a popup baloon
2319 * with title and label when clicked, if either of these is set.
2420 */
25 -function createGMarker( markerData ) {
 21+function createGMarker(markerData) {
2622 var marker;
27 -
28 - if ( markerData.icon != '' ) {
29 - var iconObj = new GIcon( G_DEFAULT_ICON );
 23+
 24+ if (markerData.icon != '') {
 25+ var iconObj = new GIcon(G_DEFAULT_ICON);
3026 iconObj.image = markerData.icon;
3127
32 -
3328 var newimg = new Image();
3429 newimg.src = markerData.icon;
35 -
36 - // Only do these things when there is an actual width, which there won,t the first time the image is loaded.
37 - // FIXME: this means the image won't have it's correct size when it differs from the default on first load!
38 - if ( newimg.width > 0 ) {
 30+
 31+ // Only do these things when there is an actual width, which there won,t
 32+ // the first time the image is loaded.
 33+ // FIXME: this means the image won't have it's correct size when it
 34+ // differs from the default on first load!
 35+ if (newimg.width > 0) {
3936 /* Determine size of icon and pass it in */
4037 iconObj.iconSize.width = newimg.width;
4138 iconObj.iconSize.height = newimg.height;
42 - iconObj.shadow = null;
43 -
 39+ iconObj.shadow = null;
 40+
4441 /* Anchor the icon on bottom middle */
4542 var anchor = new GPoint();
46 - anchor.x = Math.floor( newimg.width / 2 );
 43+ anchor.x = Math.floor(newimg.width / 2);
4744 anchor.y = newimg.height;
48 - iconObj.iconAnchor = anchor;
 45+ iconObj.iconAnchor = anchor;
4946 }
5047
51 - marker = new GMarker( markerData.point, { icon: iconObj } );
 48+ marker = new GMarker(markerData.point, {
 49+ icon : iconObj
 50+ });
5251 } else {
53 - marker = new GMarker( markerData.point );
 52+ marker = new GMarker(markerData.point);
5453 }
55 -
56 - if ( ( markerData.title + markerData.label ).length != '' ) {
57 - var bothTxtAreSet = markerData.title.length != '' && markerData.label.length != '';
58 - var popupText = bothTxtAreSet ? '<b>' + markerData.title + '</b><hr />' + markerData.label : markerData.title + markerData.label;
59 - popupText = '<div style="overflow:auto;max-height:130px;">' + popupText + '</div>';
6054
61 - GEvent.addListener(marker, 'click',
62 - function() {
63 - marker.openInfoWindowHtml(popupText, {maxWidth:350});
64 - }
65 - );
 55+ if ((markerData.title + markerData.label).length != '') {
 56+ var bothTxtAreSet = markerData.title.length != ''
 57+ && markerData.label.length != '';
 58+ var popupText = bothTxtAreSet ? '<b>' + markerData.title + '</b><hr />'
 59+ + markerData.label : markerData.title + markerData.label;
 60+ popupText = '<div style="overflow:auto;max-height:130px;">' + popupText
 61+ + '</div>';
 62+
 63+ GEvent.addListener(marker, 'click', function() {
 64+ marker.openInfoWindowHtml(popupText, {
 65+ maxWidth : 350
 66+ });
 67+ });
6668 }
6769
6870 return marker;
6971 }
7072
7173 /**
72 - * Returns GMap2 object with the provided properties and markers.
73 - * This is done by setting the map centre and size, and passing the arguments to function createGoogleMap.
 74+ * Returns GMap2 object with the provided properties and markers. This is done
 75+ * by setting the map centre and size, and passing the arguments to function
 76+ * createGoogleMap.
7477 */
7578 function initializeGoogleMap(mapName, mapOptions, markers) {
7679 if (GBrowserIsCompatible()) {
77 - mapOptions.centre = (mapOptions.lat != null && mapOptions.lon != null) ? new GLatLng(mapOptions.lat, mapOptions.lon) : null;
78 - //mapOptions.size = new GSize(mapOptions.width, mapOptions.height);
79 - return createGoogleMap(mapName, mapOptions, markers);
80 - }
81 - else {
 80+ mapOptions.centre = (mapOptions.lat != null && mapOptions.lon != null) ? new GLatLng(
 81+ mapOptions.lat, mapOptions.lon)
 82+ : null;
 83+ // mapOptions.size = new GSize(mapOptions.width, mapOptions.height);
 84+ return createGoogleMap(mapName, mapOptions, markers);
 85+ } else {
8286 return false;
8387 }
8488 }
@@ -89,119 +93,229 @@
9094 var mapElement = document.getElementById(mapName);
9195 var typesContainType = false;
9296
93 - for (var i = 0; i < mapOptions.types.length; i++) {
94 - if (mapOptions.types[i] == mapOptions.type) typesContainType = true;
 97+ for ( var i = 0; i < mapOptions.types.length; i++) {
 98+ if (mapOptions.types[i] == mapOptions.type)
 99+ typesContainType = true;
95100 }
96101
97 - if (! typesContainType) mapOptions.types.push(mapOptions.type);
 102+ if (!typesContainType)
 103+ mapOptions.types.push(mapOptions.type);
98104
99 - var map = new GMap2(mapElement, {mapTypes: mapOptions.types});
 105+ var map = new GMap2(mapElement, {
 106+ mapTypes : mapOptions.types
 107+ });
100108 map.name = mapName;
101109
102 - map.setMapType(mapOptions.type);
 110+ map.setMapType(mapOptions.type);
103111
104112 var hasSearchBar = false;
105 -
106 - for ( i = mapOptions.controls.length - 1; i >= 0; i-- ) {
107 - if ( mapOptions.controls[i] == 'searchbar' ) {
 113+
 114+ for (i = mapOptions.controls.length - 1; i >= 0; i--) {
 115+ if (mapOptions.controls[i] == 'searchbar') {
108116 hasSearchBar = true;
109117 break;
110118 }
111119 }
112 -
113 - // List of GControls: http://code.google.com/apis/maps/documentation/reference.html#GControl
114 - for ( i = 0; i < mapOptions.controls.length; i++ ) {
115 - if ( mapOptions.controls[i].toLowerCase() == 'auto' ) {
116 - if ( mapElement.offsetHeight > 75 ) mapOptions.controls[i] = mapElement.offsetHeight > 320 ? 'large' : 'small';
117 - }
118 -
119 - switch ( mapOptions.controls[i] ) {
120 - case 'large' :
121 - map.addControl( new GLargeMapControl3D() );
122 - break;
123 - case 'small' :
124 - map.addControl( new GSmallZoomControl3D() );
125 - break;
126 - case 'large-original' :
127 - map.addControl( new GLargeMapControl() );
128 - break;
129 - case 'small-original' :
130 - map.addControl( new GSmallMapControl() );
131 - break;
132 - case 'zoom' :
133 - map.addControl( new GSmallZoomControl() );
134 - break;
135 - case 'type' :
136 - map.addControl( new GMapTypeControl() );
137 - break;
138 - case 'type-menu' :
139 - map.addControl( new GMenuMapTypeControl() );
140 - break;
141 - case 'overlays' :
142 - map.addControl( new MoreControl() );
143 - break;
144 - case 'overview' : case 'overview-map' :
145 - map.addControl( new GOverviewMapControl() );
146 - break;
147 - case 'scale' :
148 - if ( hasSearchBar ) {
149 - map.addControl( new GScaleControl(), new GControlPosition( G_ANCHOR_BOTTOM_LEFT, new GSize( 5,37 ) ) );
150 - }
151 - else {
152 - map.addControl( new GScaleControl() );
153 - }
154 - break;
155 - case 'nav-label' : case 'nav' :
156 - map.addControl( new GNavLabelControl() );
157 - break;
158 - case 'searchbar' :
159 - map.enableGoogleBar();
160 - break;
 120+
 121+ // List of GControls:
 122+ // http://code.google.com/apis/maps/documentation/reference.html#GControl
 123+ for (i = 0; i < mapOptions.controls.length; i++) {
 124+ if (mapOptions.controls[i].toLowerCase() == 'auto') {
 125+ if (mapElement.offsetHeight > 75)
 126+ mapOptions.controls[i] = mapElement.offsetHeight > 320 ? 'large'
 127+ : 'small';
161128 }
162 - }
163129
164 - var bounds = ((mapOptions.zoom == null || mapOptions.centre == null) && markers.length > 1) ? new GLatLngBounds() : null;
 130+ switch (mapOptions.controls[i]) {
 131+ case 'large':
 132+ map.addControl(new GLargeMapControl3D());
 133+ break;
 134+ case 'small':
 135+ map.addControl(new GSmallZoomControl3D());
 136+ break;
 137+ case 'large-original':
 138+ map.addControl(new GLargeMapControl());
 139+ break;
 140+ case 'small-original':
 141+ map.addControl(new GSmallMapControl());
 142+ break;
 143+ case 'zoom':
 144+ map.addControl(new GSmallZoomControl());
 145+ break;
 146+ case 'type':
 147+ map.addControl(new GMapTypeControl());
 148+ break;
 149+ case 'type-menu':
 150+ map.addControl(new GMenuMapTypeControl());
 151+ break;
 152+ case 'overlays':
 153+ map.addControl(new MoreControl());
 154+ break;
 155+ case 'overview':
 156+ case 'overview-map':
 157+ map.addControl(new GOverviewMapControl());
 158+ break;
 159+ case 'scale':
 160+ if (hasSearchBar) {
 161+ map.addControl(new GScaleControl(), new GControlPosition(
 162+ G_ANCHOR_BOTTOM_LEFT, new GSize(5, 37)));
 163+ } else {
 164+ map.addControl(new GScaleControl());
 165+ }
 166+ break;
 167+ case 'nav-label':
 168+ case 'nav':
 169+ map.addControl(new GNavLabelControl());
 170+ break;
 171+ case 'searchbar':
 172+ map.enableGoogleBar();
 173+ break;
 174+ }
 175+ }
165176
166 - for ( i = markers.length - 1; i >= 0; i-- ) {
167 - var marker = markers[i];
168 - marker.point = new GLatLng( marker.lat, marker.lon );
169 - map.addOverlay( createGMarker( marker ) );
170 - if ( bounds != null ) bounds.extend( marker.point );
 177+ // Get center and zoom
 178+ var myCenter = null;
 179+ var myZoom = null;
 180+ if (mapOptions.centre != null) {
 181+ myCenter = mapOptions.centre;
171182 }
 183+ if (mapOptions.zoom != null) {
 184+ myZoom = mapOptions.zoom;
 185+ }
172186
173 - if (bounds != null) {
174 - map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
 187+ // possibly, create bounds from markers
 188+ if ((mapOptions.zoom == null || mapOptions.centre == null)
 189+ && markers.length >= 1) {
 190+ var bounds = new GLatLngBounds();
 191+
 192+ for (i = markers.length - 1; i >= 0; i--) {
 193+ var marker = markers[i];
 194+ marker.point = new GLatLng(marker.lat, marker.lon);
 195+ map.addOverlay(createGMarker(marker));
 196+ bounds.extend(marker.point);
 197+ }
 198+ if (myCenter == null) {
 199+ myCenter = bounds.getCenter();
 200+ }
 201+ if (myZoom == null) {
 202+ myZoom = map.getBoundsZoomLevel(bounds);
 203+ }
175204 }
176205
177 - if (mapOptions.centre != null) map.setCenter(mapOptions.centre);
178 - if (mapOptions.zoom != null) map.setZoom(mapOptions.zoom);
179 -
180 - if (mapOptions.scrollWheelZoom) map.enableScrollWheelZoom();
 206+ //TODO: retrieve standard values dynamically?
 207+ if ((myCenter == null || myZoom == null) || ((myCenter.lat() == 0 && myCenter.lng() == 0) && myZoom == 14)) {
 208+ map.setCenter(new GLatLng(0, 0), 14);
 209+ map.isDefaultBound = true;
 210+ } else {
 211+ map.setCenter(myCenter, myZoom);
 212+ map.isDefaultBound = false;
 213+ }
181214
 215+ // other options of map
 216+ if (mapOptions.scrollWheelZoom)
 217+ map.enableScrollWheelZoom();
 218+
182219 map.enableContinuousZoom();
183 -
 220+
 221+ // We add Listener for goDraw event
 222+ GEvent.addListener(map, "goDraw", function() {
 223+ // by now, we have all points from the kml files
 224+
 225+ var mykmlOverlays = window.GKMLOverlays[map.name];
 226+
 227+ var bounds;
 228+ // if center and zoom are set
 229+ if (map.isDefaultBound) {
 230+ // use bounds of first overlay
 231+ bounds = mykmlOverlays[0].getDefaultBounds();
 232+ } else {
 233+ bounds = map.getBounds();
 234+ }
 235+
 236+ for (i = mykmlOverlays.length - 1; i >= 0; i--) {
 237+ var point = mykmlOverlays[i].getDefaultCenter();
 238+ // extending to the same point should not make a difference
 239+ bounds.extend(point);
 240+ }
 241+
 242+ map.setCenter(bounds.getCenter(),map.getBoundsZoomLevel(bounds));
 243+
 244+ });
 245+
184246 // Code to add KML files.
185247 var kmlOverlays = [];
186 - for ( i = mapOptions.kml.length - 1; i >= 0; i-- ) {
187 - kmlOverlays[i] = new GGeoXml( mapOptions.kml[i] );
188 - map.addOverlay( kmlOverlays[i] );
 248+ // How many kml files are there, save this.
 249+ if (!window.Gkmlln) {
 250+ window.Gkmlln = new Array();
189251 }
190 -
 252+ window.Gkmlln[mapName] = mapOptions.kml.length;
 253+ // How many kml files have we already loaded? Save this.
 254+ if (!window.Gkmlnr) {
 255+ window.Gkmlnr = new Array();
 256+ }
 257+ window.Gkmlnr[mapName] = 0;
 258+ for (i = mapOptions.kml.length - 1; i >= 0; i--) {
 259+ // if only names are given
 260+ kmlOverlays[i] = new GGeoXml(mapOptions.kml[i]);
 261+ var myoverlay = kmlOverlays[i];
 262+ myoverlay.mapName = mapName;
 263+ map.addOverlay(myoverlay);
 264+
 265+ GEvent.addListener(myoverlay, "load", function() {
 266+
 267+ // What we only do here is, we count the number of loaded kml
 268+ // overlays
 269+ ++window.Gkmlnr[myoverlay.mapName];
 270+ if (window.Gkmlnr[myoverlay.mapName] >= window.Gkmlln[myoverlay.mapName]) {
 271+
 272+ var mymap = window.GMaps[myoverlay.mapName];
 273+ // we have to make sure that the map is loaded.
 274+ if (mymap.isLoaded()) {
 275+ GEvent.trigger(mymap, "goDraw");
 276+ } else {
 277+ GEvent.addListener(mymap, "load", function() {
 278+ GEvent.trigger(mymap, "goDraw");
 279+ });
 280+ }
 281+ } else {
 282+ return;
 283+ }
 284+ });
 285+
 286+ // Make the overlay variable available for other functions
 287+ if (!window.GKMLOverlays) {
 288+ window.GKMLOverlays = new Array();
 289+ }
 290+ if (!window.GKMLOverlays[mapName]) {
 291+ window.GKMLOverlays[mapName] = new Array();
 292+ }
 293+ window.GKMLOverlays[mapName][i] = myoverlay;
 294+ }
 295+
 296+ // TODO: GMaps now have another name, check whether this is a problem somewhere.
191297 // Make the map variable available for other functions.
192 - if (!window.GMaps) window.GMaps = new Object;
193 - eval("window.GMaps." + mapName + " = map;");
194 -
 298+ // if (!window.GMaps) window.GMaps = new Object;
 299+ // eval("window.GMaps." + mapName + " = map;");
 300+
 301+ if (!window.GMaps) {
 302+ window.GMaps = new Array();
 303+ }
 304+ window.GMaps[mapName] = map;
 305+
195306 return map;
196307 }
197308
198 -function setupCheckboxShiftClick() { return true; }
 309+function setupCheckboxShiftClick() {
 310+ return true;
 311+}
199312
200 -function MoreControl() {};
 313+function MoreControl() {
 314+};
201315 MoreControl.prototype = new GControl();
202316
203317 MoreControl.prototype.initialize = function(map) {
204318 this.map = map;
205 -
 319+
206320 var more = document.getElementById(map.name + "-outer-more");
207321
208322 var buttonDiv = document.createElement("div");
@@ -213,7 +327,7 @@
214328 var textDiv = document.createElement("div");
215329 textDiv.id = map.name + "-inner-more";
216330 textDiv.setAttribute('class', 'inner-more');
217 - textDiv.appendChild(document.createTextNode( msgOverlays ));
 331+ textDiv.appendChild(document.createTextNode(msgOverlays));
218332
219333 buttonDiv.appendChild(textDiv);
220334
@@ -222,7 +336,8 @@
223337 more.onmouseout = setGLayerboxClose;
224338
225339 // Insert the button just after outer_more div.
226 - more.insertBefore(buttonDiv, document.getElementById(map.name + "-more-box").parentNode);
 340+ more.insertBefore(buttonDiv, document
 341+ .getElementById(map.name + "-more-box").parentNode);
227342
228343 // Remove the whole div from its location and reinsert it to the map.
229344 map.getContainer().appendChild(more);
@@ -234,44 +349,46 @@
235350 return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 35));
236351 };
237352
238 -function checkGChecked(mapName) {
239 - // Returns true if a checkbox is still checked otherwise false.
240 - var boxes = document.getElementsByName(mapName + "-overlay-box");
241 - for(var i = 0; i < boxes.length; i++) {
242 - if(boxes[i].checked) return true;
 353+function checkGChecked(mapName) {
 354+ // Returns true if a checkbox is still checked otherwise false.
 355+ var boxes = document.getElementsByName(mapName + "-overlay-box");
 356+ for ( var i = 0; i < boxes.length; i++) {
 357+ if (boxes[i].checked)
 358+ return true;
243359 }
244360 return false;
245361 }
246362
247363 function showGLayerbox() {
248 - var mapName = this.id.split('-')[0];
249 - eval("if(window.timer_" + mapName + ") clearTimeout(timer_" + mapName + ");");
 364+ var mapName = this.id.split('-')[0];
 365+ eval("if(window.timer_" + mapName + ") clearTimeout(timer_" + mapName
 366+ + ");");
250367 document.getElementById(mapName + "-more-box").style.display = "block";
251 - var button = document.getElementById(mapName + "-inner-more");
 368+ var button = document.getElementById(mapName + "-inner-more");
252369 button.style.borderBottomWidth = "4px";
253370 button.style.borderBottomColor = "white";
254371 }
255372
256 -
257373 function setGLayerboxClose() {
258374 var mapName = this.id.split('-')[0];
259 - var layerbox = document.getElementById(mapName + "-more-box");
260 - var button = document.getElementById(mapName + "-inner-more");
261 - var bottomColor = checkGChecked(mapName) ? "#6495ed" : "#c0c0c0";
262 - eval("timer_" + mapName + " = window.setTimeout(function() { layerbox.style.display = 'none'; button.style.borderBottomWidth = '1px'; button.style.borderBottomColor = bottomColor; }, 400);");
 375+ var layerbox = document.getElementById(mapName + "-more-box");
 376+ var button = document.getElementById(mapName + "-inner-more");
 377+ var bottomColor = checkGChecked(mapName) ? "#6495ed" : "#c0c0c0";
 378+ eval("timer_"
 379+ + mapName
 380+ + " = window.setTimeout(function() { layerbox.style.display = 'none'; button.style.borderBottomWidth = '1px'; button.style.borderBottomColor = bottomColor; }, 400);");
263381 }
264382
265383 function switchGLayer(map, checked, layer) {
266 - var layerbox = document.getElementById(map.name + "-more-box");
267 - var button = document.getElementById(map.name + "-inner-more");
268 -
269 - if(checked) {
270 - map.addOverlay(layer);
 384+ var layerbox = document.getElementById(map.name + "-more-box");
 385+ var button = document.getElementById(map.name + "-inner-more");
 386+
 387+ if (checked) {
 388+ map.addOverlay(layer);
 389+ } else {
 390+ map.removeOverlay(layer);
271391 }
272 - else {
273 - map.removeOverlay(layer);
274 - }
275 -
 392+
276393 }
277394
278395 function initiateGOverlay(elementId, mapName, urlNr) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r82289Follow up to r82288jeroendedauw20:09, 16 February 2011

Status & tagging log