r62036 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62035‎ | r62036 | r62037 >
Date:17:23, 5 February 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.5.4.
* Support for defining OpenLayers layers
Modified paths:
  • /trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php (modified) (history)
  • /trunk/extensions/Maps/Maps.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)
  • /trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php (modified) (history)
  • /trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js (modified) (history)
  • /trunk/extensions/Maps/OpenStreetMap/Maps_OSM.php (modified) (history)
  • /trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js
@@ -108,127 +108,23 @@
109109 /**
110110 * Adds all map type base layers to a map, and returns it.
111111 */
112 -function addMapBaseLayers(map, mapTypes) {
 112+function addMapBaseLayers(map, layers) {
113113 // Variables for whowing an error when the Google Maps API is not loaded
114114 var googleAPILoaded = typeof(G_NORMAL_MAP) != 'undefined';
115115 var shownApiError = false;
116116
117 - // Variables to prevent double adding of a base layer
118 - var usedNor = false; var usedSat = false; var usedHyb = false; var usedPhy = false; // Google types
119 - var usedBingNor = false; var usedBingHyb = false; var usedBingSat = false; // Bing types
120 - var usedYahooNor = false; var usedYahooHyb = false; var usedYahooSat = false; // Yahoo types
121 - var usedOLWMS = false; // OL types
122 - var usedOSMnik = false; var usedOSMcycle = false; var usedOSMarender = false; // OSM types
123 - var usedNasa = false; // Others
124 -
125117 var isDefaultBaseLayer = false;
126118
127119 // Add the base layers
128 - for (i in mapTypes) {
129 - //if (mapTypes[i].substring(0, 1) == '+') {
130 - // mapTypes[i] = mapTypes[i].substring(1);
131 - // isDefaultBaseLayer = true;
132 - //}
133 -
134 - var newLayer = null;
135 -
136 - // TODO: allow adding of custom layers somehow
137 - // TODO: layer name alliasing system? php or js based?
138 - switch(mapTypes[i]) {
139 - case 'google' : case 'google-normal' : case 'google-satellite' : case 'google-hybrid' : case 'google-physical' :
140 - if (googleAPILoaded) {
141 - switch(mapTypes[i]) {
142 - case 'google-normal' :
143 - if (!usedNor){ newLayer = new OpenLayers.Layer.Google( 'Google Streets', {'sphericalMercator':true} ); usedNor = true; }
144 - break;
145 - case 'google-satellite' :
146 - if (!usedSat){ newLayer = new OpenLayers.Layer.Google( 'Google Satellite' , {type: G_SATELLITE_MAP , 'sphericalMercator':true}); usedSat = true; }
147 - break;
148 - case 'google-hybrid' :
149 - if (!usedHyb){ newLayer = new OpenLayers.Layer.Google( 'Google Hybrid' , {type: G_HYBRID_MAP , 'sphericalMercator':true}); usedHyb = true; }
150 - break;
151 - case 'google-physical' :
152 - if (!usedPhy){ newLayer = new OpenLayers.Layer.Google( 'Google Physical' , {type: G_PHYSICAL_MAP , 'sphericalMercator':true}); usedPhy = true; }
153 - break;
154 - case 'google' :
155 - if (!usedNor){ map.addLayer(new OpenLayers.Layer.Google( 'Google Streets' , {'sphericalMercator':true})); usedNor = true; }
156 - if (!usedSat){ map.addLayer(new OpenLayers.Layer.Google( 'Google Satellite' , {type: G_SATELLITE_MAP , 'sphericalMercator':true})); usedSat = true; }
157 - if (!usedHyb){ map.addLayer(new OpenLayers.Layer.Google( 'Google Hybrid' , {type: G_HYBRID_MAP , 'sphericalMercator':true})); usedHyb = true; }
158 - if (!usedPhy){ map.addLayer(new OpenLayers.Layer.Google( 'Google Physical' , {type: G_PHYSICAL_MAP , 'sphericalMercator':true})); usedPhy = true; }
159 - break;
160 - }
161 - }
162 - else {
163 - if (!shownApiError) { window.alert('Please enter your Google Maps API key to use the Google Maps layers'); shownApiError = true; }
164 - }
165 - break;
166 - case 'bing' : case 'virtual-earth' :
167 - if (!usedBingNor){ map.addLayer(new OpenLayers.Layer.VirtualEarth( 'Bing Streets' , {type: VEMapStyle.Shaded, 'sphericalMercator':true} )); usedBingNor = true; }
168 - if (!usedBingSat){ map.addLayer(new OpenLayers.Layer.VirtualEarth( 'Bing Satellite' , {type: VEMapStyle.Aerial, 'sphericalMercator':true} )); usedBingSat = true; }
169 - if (!usedBingHyb){ map.addLayer(new OpenLayers.Layer.VirtualEarth( 'Bing Hybrid' , {type: VEMapStyle.Hybrid, 'sphericalMercator':true} )); usedBingHyb = true; }
170 - break;
171 - case 'bing-normal' :
172 - if (!usedBingNor){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Streets' , {type: VEMapStyle.Shaded, 'sphericalMercator':true} ); usedBingNor = true; }
173 - case 'bing-satellite' :
174 - if (!usedBingSat){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Satellite' , {type: VEMapStyle.Aerial, 'sphericalMercator':true} ); usedBingSat = true; }
175 - case 'bing-hybrid' :
176 - if (!usedBingHyb){ newLayer = new OpenLayers.Layer.VirtualEarth( 'Bing Hybrid' , {type: VEMapStyle.Hybrid, 'sphericalMercator':true} ); usedBingHyb = true; }
177 - case 'yahoo' :
178 - if (!usedYahooNor){ map.addLayer(new OpenLayers.Layer.Yahoo( 'Yahoo! Streets' ), {'sphericalMercator':true}); usedYahooNor = true; }
179 - if (!usedYahooSat){ map.addLayer(new OpenLayers.Layer.Yahoo( 'Yahoo! Satellite', {'type': YAHOO_MAP_SAT, 'sphericalMercator':true} )); usedYahooSat = true; }
180 - if (!usedYahooHyb){ map.addLayer(new OpenLayers.Layer.Yahoo( 'Yahoo! Hybrid', {'type': YAHOO_MAP_HYB, 'sphericalMercator':true} )); usedYahooHyb = true; }
181 - break;
182 - case 'yahoo-normal' :
183 - if (!usedYahooNor){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo! Streets', {'sphericalMercator':true} ); usedYahooNor = true; }
184 - break;
185 - case 'yahoo-satellite' :
186 - if (!usedYahooSat){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo! Satellite', {'type': YAHOO_MAP_SAT, 'sphericalMercator':true} ); usedYahooSat = true; }
187 - break;
188 - case 'yahoo-hybrid' :
189 - if (!usedYahooHyb){ newLayer = new OpenLayers.Layer.Yahoo( 'Yahoo! Hybrid', {'type': YAHOO_MAP_HYB, 'sphericalMercator':true} ); usedYahooHyb = true; }
190 - break;
191 - case 'openlayers' : case 'open-layers' :
192 - if (!usedOLWMS){ newLayer = new OpenLayers.Layer.WMS( 'OpenLayers WMS', 'http://labs.metacarta.com/wms/vmap0', {layers: 'basic', 'sphericalMercator':true} ); usedOLWMS = true; }
193 - break;
194 - case 'nasa' :
195 - if (!usedNasa){ newLayer = new OpenLayers.Layer.WMS("NASA Global Mosaic", "http://t1.hypercube.telascience.org/cgi-bin/landsat7", {layers: "landsat7", 'sphericalMercator':true} ); usedNasa = true; }
196 - break;
197 - case 'osm' : case 'openstreetmap' :
198 - if (!usedOSMarender){ map.addLayer(new OpenLayers.Layer.OSM.Osmarender("OSM arender")); usedOSMarender = true; }
199 - if (!usedOSMnik){ map.addLayer(new OpenLayers.Layer.OSM.Mapnik("OSM Mapnik"), {'sphericalMercator':true}); usedOSMnik = true; }
200 - if (!usedOSMcycle){ map.addLayer(new OpenLayers.Layer.OSM.CycleMap("OSM Cycle Map"), {'sphericalMercator':true}); usedOSMcycle = true; }
201 - break;
202 - case 'osmarender' :
203 - if (!usedOSMarender){ newLayer = new OpenLayers.Layer.OSM.Osmarender("OSM arender"); usedOSMarender = true; }
204 - break;
205 - case 'osm-nik' : case 'osm-mapnik' :
206 - if (!usedOSMnik){ newLayer = new OpenLayers.Layer.OSM.Mapnik("OSM Mapnik"); usedOSMnik = true; }
207 - break;
208 - case 'osm-cycle' : case 'osm-cyclemap' :
209 - if (!usedOSMcycle){ newLayer = new OpenLayers.Layer.OSM.CycleMap("OSM Cycle Map"); usedOSMcycle = true; }
210 - break;
211 - }
212 -
213 - if (newLayer != null) {
214 - map.addLayer(newLayer);
215 -
216 - /*
217 - if (isDefaultBaseLayer) {
218 - // FIXME: This messes up the layer for some reason
219 - // Probably fixed by adding this code to an onload event (problem that other layer gets loaded first?)
220 - map.setBaseLayer(newLayer);
221 - isDefaultBaseLayer = false;
222 - }
223 - */
224 - }
225 - }
 120+ for (i in layers) map.addLayer(layers[i]);
 121+
226122 return map;
227123 }
228124
229125 function getOLMarker(markerLayer, markerData, projectionObject) {
230126 var marker;
231127
232 - if (markerData.icon != '') {
 128+ if (markerData.icon != "") {
233129 //var iconSize = new OpenLayers.Size(10,17);
234130 //var iconOffset = new OpenLayers.Pixel(-(iconSize.w/2), -iconSize.h);
235131 marker = new OpenLayers.Marker(markerData.lonlat, new OpenLayers.Icon(markerData.icon)); // , iconSize, iconOffset
@@ -239,12 +135,12 @@
240136 if (markerData.title.length + markerData.label.length > 0 ) {
241137
242138 // This is the handler for the mousedown event on the marker, and displays the popup
243 - marker.events.register('mousedown', marker,
 139+ marker.events.register("mousedown", marker,
244140 function(evt) {
245141 var popup = new OpenLayers.Feature(markerLayer, markerData.lonlat).createPopup(true);
246142
247143 if (markerData.title.length > 0 && markerData.label.length > 0) { // Add the title and label to the popup text
248 - popup.setContentHTML('<b>' + markerData.title + "</b><hr />" + markerData.label);
 144+ popup.setContentHTML("<b>" + markerData.title + "</b><hr />" + markerData.label);
249145 }
250146 else {
251147 popup.setContentHTML(markerData.title + markerData.label);
@@ -274,6 +170,6 @@
275171 function initOLSettings(minWidth, minHeight) {
276172 OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
277173 OpenLayers.Util.onImageLoadErrorColor = "transparent";
278 - OpenLayers.Feature.prototype.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {'autoSize': true, 'minSize': new OpenLayers.Size(minWidth, minHeight)});
 174+ OpenLayers.Feature.prototype.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {"autoSize": true, "minSize": new OpenLayers.Size(minWidth, minHeight)});
279175 }
280176
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php
@@ -48,12 +48,13 @@
4949
5050 public static function initialize() {
5151 self::initializeParams();
 52+ Validator::addOutputFormat('olgroups', array(__CLASS__, 'unpackLayerGroups'));
5253 }
5354
5455 private static function initializeParams() {
5556 global $egMapsServices, $egMapsOLLayers, $egMapsOLControls, $egMapsOpenLayersZoom;
5657
57 - $egMapsServices[self::SERVICE_NAME]['parameters']['default'] = $egMapsOpenLayersZoom;
 58+ $egMapsServices[self::SERVICE_NAME]['parameters']['zoom']['default'] = $egMapsOpenLayersZoom;
5859 $egMapsServices[self::SERVICE_NAME]['parameters']['zoom']['criteria']['in_range'] = array(0, 19);
5960
6061 $egMapsServices[self::SERVICE_NAME]['parameters'] = array(
@@ -62,17 +63,21 @@
6364 'criteria' => array(
6465 'in_array' => self::getControlNames()
6566 ),
66 - 'default' => $egMapsOLControls ,
 67+ 'default' => $egMapsOLControls,
6768 'output-type' => array('list', ',', '\'')
6869 ),
69 - 'layers' => array(
 70+ 'layers' => array(
7071 'type' => array('string', 'list'),
7172 'criteria' => array(
72 - 'in_array' => self::getLayerNames()
 73+ 'in_array' => self::getLayerNames(true)
7374 ),
74 - 'default' => $egMapsOLLayers
 75+ 'default' => $egMapsOLLayers,
 76+ 'output-types' => array(
 77+ 'unique_items',
 78+ 'olgroups',
 79+ array('filtered_array', self::getLayerNames()),
 80+ )
7581 ),
76 - /* 'baselayer' => array(), */
7782 );
7883 }
7984
@@ -97,20 +102,15 @@
98103 }
99104
100105 /**
101 - * Returns the names of all supported layers.
102 - * This data is a copy of the one used to actually translate the names
103 - * into the layers, since this resides client side, in OpenLayerFunctions.js.
 106+ * Returns the names of all supported layers.
104107 *
105108 * @return array
106109 */
107 - public static function getLayerNames() {
108 - return array(
109 - 'google', 'google-normal', 'google-satellite', 'google-hybrid', 'google-hybrid', 'google-physical',
110 - 'bing', 'virtual-earth', 'bing-normal', 'bing-satellite', 'bing-hybrid',
111 - 'yahoo', 'yahoo-normal', 'yahoo-satellite', 'yahoo-hybrid',
112 - 'openlayers', 'open-layers', 'nasa',
113 - 'openstreetmap', 'osm', 'osmarender', 'osm-nik', 'osm-mapnik', 'osm-cycle', 'osm-cyclemap'
114 - );
 110+ public static function getLayerNames($includeGroups = false) {
 111+ global $egMapsOLAvailableLayers, $egMapsOLLayerGroups;
 112+ $keys = array_keys($egMapsOLAvailableLayers);
 113+ if ($includeGroups) $keys = array_merge($keys, array_keys($egMapsOLLayerGroups));
 114+ return $keys;
115115 }
116116
117117 /**
@@ -124,22 +124,22 @@
125125 global $egGoogleMapsOnThisPage, $egMapsScriptPath, $egMapsStyleVersion;
126126
127127 switch ($layer) {
128 - case 'google' : case 'google-normal' : case 'google-sattelite' : case 'google-hybrid' : case 'google-physical' :
 128+ case 'google-normal' : case 'google-sattelite' : case 'google-hybrid' : case 'google-physical' :
129129 if (empty($egGoogleMapsOnThisPage)) {
130130 $egGoogleMapsOnThisPage = 0;
131131 MapsGoogleMaps::addGMapDependencies($output);
132132 }
133133 break;
134 - case 'bing' : case 'virtual-earth' :
 134+ case 'bing-normal' : case 'bing-satellite' : case 'bing-hybrid' :
135135 if (!self::$loadedBing) { $output .= "<script type='$wgJsMimeType' src='http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1'></script>\n"; self::$loadedBing = true; }
136136 break;
137 - case 'yahoo' : case 'yahoo-maps' :
 137+ case 'yahoo-normal' : case 'yahoo-satellite' : case 'yahoo-hybrid' :
138138 if (!self::$loadedYahoo) { $output .= "<style type='text/css'> #controls {width: 512px;}</style><script src='http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers'></script>\n"; self::$loadedYahoo = true; }
139139 break;
140 - case 'openlayers' : case 'open-layers' :
 140+ case 'openlayers-wms' :
141141 if (!self::$loadedOL) { $output .= "<script type='$wgJsMimeType' src='http://clients.multimap.com/API/maps/1.1/metacarta_04'></script>\n"; self::$loadedOL = true; }
142142 break;
143 - case 'osm' : case 'openstreetmap' :
 143+ case 'osmarender' : case 'osm-mapnik' : case 'osm-cyclemap' :
144144 if (!self::$loadedOSM) { $output .= "<script type='$wgJsMimeType' src='$egMapsScriptPath/OpenLayers/OSM/OpenStreetMap.js?$egMapsStyleVersion'></script>\n"; self::$loadedOSM = true; }
145145 break;
146146 }
@@ -159,7 +159,7 @@
160160
161161 $output .="<link rel='stylesheet' href='$egMapsScriptPath/OpenLayers/OpenLayers/theme/default/style.css' type='text/css' />
162162 <script type='$wgJsMimeType' src='$egMapsScriptPath/OpenLayers/OpenLayers/OpenLayers.js'></script>
163 - <script type='$wgJsMimeType' src='$egMapsScriptPath/OpenLayers/OpenLayerFunctions.min.js?$egMapsStyleVersion'></script>
 163+ <script type='$wgJsMimeType' src='$egMapsScriptPath/OpenLayers/OpenLayerFunctions.js?$egMapsStyleVersion'></script>
164164 <script type='$wgJsMimeType'>initOLSettings(200, 100);</script>\n";
165165 }
166166 }
@@ -172,9 +172,33 @@
173173 * @return csv string
174174 */
175175 public static function createLayersStringAndLoadDependencies(&$output, array $layers) {
176 - foreach ($layers as $layer) self::loadDependencyWhenNeeded($output, $layer);
177 - return "'" . implode("','", $layers) . "'";
178 - }
 176+ global $egMapsOLAvailableLayers;
 177+ $layerStr = array();
 178+
 179+ foreach ($layers as $layer) {
 180+ self::loadDependencyWhenNeeded($output, $layer);
 181+ $layerStr[] = $egMapsOLAvailableLayers[$layer];
 182+ }
 183+
 184+ return 'new ' . implode(',new ', $layerStr);
 185+ }
179186
 187+ public static function unpackLayerGroups(&$layers) {
 188+ global $egMapsOLLayerGroups;
 189+
 190+ $unpacked = array();
 191+
 192+ foreach($layers as $layerOrGroup) {
 193+ if (array_key_exists($layerOrGroup, $egMapsOLLayerGroups)) {
 194+ $unpacked = array_merge($unpacked, $egMapsOLLayerGroups[$layerOrGroup]);
 195+ }
 196+ else {
 197+ $unpacked[] = $layerOrGroup;
 198+ }
 199+ }
 200+
 201+ $layers = $unpacked;
 202+ }
 203+
180204 }
181205
\ No newline at end of file
Index: trunk/extensions/Maps/Maps.php
@@ -33,7 +33,7 @@
3434 echo '<b>Warning:</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>.';
3535 }
3636 else {
37 - define('Maps_VERSION', '0.5.3');
 37+ define('Maps_VERSION', '0.5.4 a2');
3838
3939 $egMapsScriptPath = $wgScriptPath . '/extensions/Maps';
4040 $egMapsIP = $IP . '/extensions/Maps';
Index: trunk/extensions/Maps/OpenStreetMap/Maps_OSM.php
@@ -51,7 +51,7 @@
5252 global $wgLang;
5353 global $egMapsServices, $egMapsOSMZoom, $egMapsOSMControls;
5454
55 - $egMapsServices[self::SERVICE_NAME]['parameters']['default'] = $egMapsOSMZoom;
 55+ $egMapsServices[self::SERVICE_NAME]['parameters']['zoom']['default'] = $egMapsOSMZoom;
5656 $egMapsServices[self::SERVICE_NAME]['parameters']['zoom']['criteria']['in_range'] = array(0, 19);
5757
5858 $egMapsServices[self::SERVICE_NAME]['parameters'] = array(
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php
@@ -44,9 +44,9 @@
4545
4646 public static function initialize() {
4747 self::initializeParams();
48 - Validator::addOutputFormat('gmaptype', array('MapsGoogleMaps', 'setGMapType'));
49 - Validator::addOutputFormat('gmaptypes', array('MapsGoogleMaps', 'setGMapTypes'));
50 - Validator::addValidationFunction('is_google_overlay', array('MapsGoogleMaps', 'isGOverlay'));
 48+ Validator::addOutputFormat('gmaptype', array(__CLASS__, 'setGMapType'));
 49+ Validator::addOutputFormat('gmaptypes', array(__CLASS__, 'setGMapTypes'));
 50+ Validator::addValidationFunction('is_google_overlay', array(__CLASS__, 'isGOverlay'));
5151 }
5252
5353 private static function initializeParams() {
@@ -54,7 +54,7 @@
5555
5656 $allowedTypes = self::getTypeNames();
5757
58 - $egMapsServices[self::SERVICE_NAME]['parameters']['default'] = $egMapsGoogleMapsZoom;
 58+ $egMapsServices[self::SERVICE_NAME]['parameters']['zoom']['default'] = $egMapsGoogleMapsZoom;
5959 $egMapsServices[self::SERVICE_NAME]['parameters']['zoom']['criteria']['in_range'] = array(0, 20);
6060
6161 $egMapsServices[self::SERVICE_NAME]['parameters'] = array(
Index: trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php
@@ -44,8 +44,8 @@
4545
4646 public static function initialize() {
4747 self::initializeParams();
48 - Validator::addOutputFormat('ymaptype', array('MapsYahooMaps', 'setYMapType'));
49 - Validator::addOutputFormat('ymaptypes', array('MapsYahooMaps', 'setYMapTypes'));
 48+ Validator::addOutputFormat('ymaptype', array(__CLASS__, 'setYMapType'));
 49+ Validator::addOutputFormat('ymaptypes', array(__CLASS__, 'setYMapTypes'));
5050 }
5151
5252 private static function initializeParams() {
@@ -53,7 +53,7 @@
5454
5555 $allowedTypes = MapsYahooMaps::getTypeNames();
5656
57 - $egMapsServices[self::SERVICE_NAME]['parameters']['default'] = $egMapsYahooMapsZoom;
 57+ $egMapsServices[self::SERVICE_NAME]['parameters']['zoom']['default'] = $egMapsYahooMapsZoom;
5858 $egMapsServices[self::SERVICE_NAME]['parameters']['zoom']['criteria']['in_range'] = array(1, 13);
5959
6060 $egMapsServices[self::SERVICE_NAME]['parameters'] = array(
Index: trunk/extensions/Maps/Maps_Settings.php
@@ -245,10 +245,41 @@
246246
247247 # Array of String. The default layers for Open Layers. This value will only be used when the user does not provide one.
248248 # Available values: google, bing, yahoo, openlayers, nasa
249 -$egMapsOLLayers = array('openlayers');
 249+$egMapsOLLayers = array('openlayers-wms');
250250
 251+# The difinitions for the layers that should be available for the user.
 252+$egMapsOLAvailableLayers = array(
 253+ 'google-normal' => 'OpenLayers.Layer.Google( "Google Streets", {"sphericalMercator":true} )',
 254+ 'google-satellite' => 'OpenLayers.Layer.Google( "Google Satellite", {type: G_SATELLITE_MAP , "sphericalMercator":true} )',
 255+ 'google-hybrid' => 'OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP , "sphericalMercator":true} )',
 256+ 'google-physical' => 'OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP , "sphericalMercator":true} )',
251257
 258+ 'bing-normal' => 'OpenLayers.Layer.VirtualEarth( "Bing Streets", {type: VEMapStyle.Shaded, "sphericalMercator":true} )',
 259+ 'bing-satellite' => 'OpenLayers.Layer.VirtualEarth( "Bing Satellite", {type: VEMapStyle.Aerial, "sphericalMercator":true} )',
 260+ 'bing-hybrid' => 'OpenLayers.Layer.VirtualEarth( "Bing Hybrid", {type: VEMapStyle.Hybrid, "sphericalMercator":true} )',
252261
 262+ 'yahoo-normal' => 'OpenLayers.Layer.Yahoo( "Yahoo! Streets", {"sphericalMercator":true} )',
 263+ 'yahoo-hybrid' => 'OpenLayers.Layer.Yahoo( "Yahoo! Hybrid", {"type": YAHOO_MAP_HYB, "sphericalMercator":true} )',
 264+ 'yahoo-satellite' => 'OpenLayers.Layer.Yahoo( "Yahoo! Satellite", {"type": YAHOO_MAP_SAT, "sphericalMercator":true} )',
 265+
 266+ 'osmarender' => 'OpenLayers.Layer.OSM.Osmarender("OSM arender")',
 267+ 'osm-mapnik' => 'OpenLayers.Layer.OSM.Mapnik("OSM Mapnik")',
 268+ 'osm-cyclemap' => 'OpenLayers.Layer.OSM.CycleMap("OSM Cycle Map")',
 269+
 270+ 'openlayers-wms' => 'OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: "basic", "sphericalMercator":true} )',
 271+
 272+ 'nasa' => 'OpenLayers.Layer.WMS("NASA Global Mosaic", "http://t1.hypercube.telascience.org/cgi-bin/landsat7", {layers: "landsat7", "sphericalMercator":true} )',
 273+);
 274+
 275+# Layer group definitions. Group names must be different from layer names, and must only contain layers that are present in $egMapsOLAvailableLayers.
 276+$egMapsOLLayerGroups = array(
 277+ 'google' => array('google-normal', 'google-satellite', 'google-hybrid', 'google-physical'),
 278+ 'yahoo' => array('yahoo-normal', 'yahoo-satellite', 'yahoo-hybrid'),
 279+ 'bing' => array('bing-normal', 'bing-satellite', 'bing-hybrid'),
 280+ 'osm' => array('osmarender', 'osm-mapnik', 'osm-cyclemap'),
 281+);
 282+
 283+
253284 # OpenStreetMap (OpenLayers optimized for OSM)
254285
255286 # String. The OSM map name prefix. It can not be identical to the one of another mapping service.

Status & tagging log