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);