r59900 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59899‎ | r59900 | r59901 >
Date:20:06, 9 December 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Small fixed to OpenLayers functionality.
Modified paths:
  • /trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php (modified) (history)
  • /trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js
@@ -28,13 +28,13 @@
2929
3030 // Add the controls
3131 for (i in controls) {
32 -
 32+
3333 // If a string is provided, find the correct name for the control, and use eval to create the object itself
3434 if (typeof controls[i] == 'string') {
3535 if (controls[i].toLowerCase() == 'autopanzoom') {
3636 if (height > 140) controls[i] = height > 320 ? 'panzoombar' : 'panzoom';
37 - }
38 -
 37+ }
 38+
3939 control = getValidControlName(controls[i]);
4040
4141 if (control) {
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php
@@ -110,10 +110,10 @@
111111 public static function getLayerNames() {
112112 return array(
113113 'google', 'google-normal', 'google-satellite', 'google-hybrid', 'google-hybrid', 'google-physical',
114 - 'bing', 'bing-normal', 'bing-satellite', 'bing-hybrid',
 114+ 'bing', 'virtual-earth', 'bing-normal', 'bing-satellite', 'bing-hybrid',
115115 'yahoo', 'yahoo-normal', 'yahoo-satellite', 'yahoo-hybrid',
116 - 'openlayers', 'nasa',
117 - 'openstreetmap', 'osmarender', 'osm-nik', 'osm-cycle'
 116+ 'openlayers', 'open-layers', 'nasa',
 117+ 'openstreetmap', 'osm', 'osmarender', 'osm-nik', 'osm-mapnik', 'osm-cycle', 'osm-cyclemap'
118118 );
119119 }
120120
@@ -122,7 +122,7 @@
123123 *
124124 * @param string $output The output to which the html to load the dependencies needs to be added
125125 * @param string $layer The layer to check (and load the dependencies for
126 - */
 126+ */
127127 public static function loadDependencyWhenNeeded(&$output, $layer) {
128128 global $wgJsMimeType;
129129 global $egGoogleMapsOnThisPage, $egMapsScriptPath, $egMapsStyleVersion;

Status & tagging log