r62039 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62038‎ | r62039 | r62040 >
Date:17:41, 5 February 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
JS improvements
Modified paths:
  • /trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js
@@ -48,7 +48,8 @@
4949
5050 }
5151
52 - addMapBaseLayers(map, mapTypes);
 52+ // Add the base layers
 53+ for (i in mapTypes) map.addLayer(mapTypes[i]);
5354
5455 // Layer to hold the markers
5556 var markerLayer = new OpenLayers.Layer.Markers('Markers');
@@ -104,23 +105,7 @@
105106
106107 return false;
107108 }
108 -
109 -/**
110 - * Adds all map type base layers to a map, and returns it.
111 - */
112 -function addMapBaseLayers(map, layers) {
113 - // Variables for whowing an error when the Google Maps API is not loaded
114 - var googleAPILoaded = typeof(G_NORMAL_MAP) != 'undefined';
115 - var shownApiError = false;
116109
117 - var isDefaultBaseLayer = false;
118 -
119 - // Add the base layers
120 - for (i in layers) map.addLayer(layers[i]);
121 -
122 - return map;
123 -}
124 -
125110 function getOLMarker(markerLayer, markerData, projectionObject) {
126111 var marker;
127112

Status & tagging log