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
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
{controls:[new OpenLayers.Control.MouseDefaults()]});
|
{controls:[new OpenLayers.Control.MouseDefaults()]});
|
||||||
|
|
||||||
velayer = new OpenLayers.Layer.VirtualEarth( "VE",
|
velayer = new OpenLayers.Layer.VirtualEarth( "VE",
|
||||||
{ minZoomLevel: 4, maxZoomLevel: 6 });
|
{ minZoomLevel: 4, maxZoomLevel: 6, 'type': VEMapStyle.Aerial});
|
||||||
map.addLayer(velayer);
|
map.addLayer(velayer);
|
||||||
|
|
||||||
markers = new OpenLayers.Layer.Markers("markers");
|
markers = new OpenLayers.Layer.Markers("markers");
|
||||||
|
|||||||
@@ -52,6 +52,12 @@ OpenLayers.Layer.VirtualEarth.prototype =
|
|||||||
moveTo:function(bounds, zoomChanged, minor) {
|
moveTo:function(bounds, zoomChanged, minor) {
|
||||||
|
|
||||||
if (this.vemap != null) {
|
if (this.vemap != null) {
|
||||||
|
|
||||||
|
if (this.type != null) {
|
||||||
|
this.vemap.SetMapStyle(this.type);
|
||||||
|
this.type = null;
|
||||||
|
}
|
||||||
|
|
||||||
var olCenter = this.map.getCenter();
|
var olCenter = this.map.getCenter();
|
||||||
var veCenter = this.getVELatLongFromOLLonLat(olCenter);
|
var veCenter = this.getVELatLongFromOLLonLat(olCenter);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user