From 890b2a6ffc99de7ee1a9c8f84f029d07691e8252 Mon Sep 17 00:00:00 2001 From: euzuro Date: Mon, 2 Oct 2006 21:48:21 +0000 Subject: [PATCH] allow VE to specify map type. fix for #273. update ve.html example to show how git-svn-id: http://svn.openlayers.org/trunk/openlayers@1526 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/ve.html | 2 +- lib/OpenLayers/Layer/VirtualEarth.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/ve.html b/examples/ve.html index 4d04215869..7580666eb8 100644 --- a/examples/ve.html +++ b/examples/ve.html @@ -26,7 +26,7 @@ {controls:[new OpenLayers.Control.MouseDefaults()]}); velayer = new OpenLayers.Layer.VirtualEarth( "VE", - { minZoomLevel: 4, maxZoomLevel: 6 }); + { minZoomLevel: 4, maxZoomLevel: 6, 'type': VEMapStyle.Aerial}); map.addLayer(velayer); markers = new OpenLayers.Layer.Markers("markers"); diff --git a/lib/OpenLayers/Layer/VirtualEarth.js b/lib/OpenLayers/Layer/VirtualEarth.js index 27ecef52f7..c2ccb11ad0 100644 --- a/lib/OpenLayers/Layer/VirtualEarth.js +++ b/lib/OpenLayers/Layer/VirtualEarth.js @@ -52,6 +52,12 @@ OpenLayers.Layer.VirtualEarth.prototype = moveTo:function(bounds, zoomChanged, minor) { if (this.vemap != null) { + + if (this.type != null) { + this.vemap.SetMapStyle(this.type); + this.type = null; + } + var olCenter = this.map.getCenter(); var veCenter = this.getVELatLongFromOLLonLat(olCenter);