Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Better VE default max zoom + restrictedExtent support. VE's zoom is maxe #81

Merged
merged 1 commit into from Sep 26, 2011
Jump to file or symbol
Failed to load files and symbols.
+5 −1
Split
View
@@ -128,7 +128,7 @@ var olwidget = {
var typeCode = this.types[type]();
return new OpenLayers.Layer.VirtualEarth("Bing Maps (" + type + ")",
- {sphericalMercator: true, minZoomLevel: 2, type: typeCode });
+ {sphericalMercator: true, minZoomLevel: 4, type: typeCode });
},
types: {
road: function() { return VEMapStyle.Road; },
@@ -227,6 +227,10 @@ olwidget.Map = OpenLayers.Class(OpenLayers.Map, {
// construct objects for serialized options
var me = opts.mapOptions.maxExtent;
opts.mapOptions.maxExtent = new OpenLayers.Bounds(me[0], me[1], me[2], me[3]);
+ if (opts.mapOptions.restrictedExtent) {
+ var re = opts.mapOptions.restrictedExtent;
+ opts.mapOptions.restrictedExtent = new OpenLayers.Bounds(re[0], re[1], re[2], re[3]);
+ }
opts.mapOptions.projection = new OpenLayers.Projection(opts.mapOptions.projection);
opts.mapOptions.displayProjection = new OpenLayers.Projection(
opts.mapOptions.displayProjection);