Hi All
I have a problem can not be solved for long time.
I have set up a map that have google map as base map and WMS, WFS overlays. it
worked fine. however I got bounds is null error once i add overview control on
the map. code is
var proj = new OpenLayers.Projection("EPSG:4326");
map = new OpenLayers.Map($('center'), {
maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
numZoomLevels: 18,
maxResolution: 156543.0339,
units: 'm',
projection: "EPSG:900913",
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
maxZOOM = 21
var gphy = new OpenLayers.Layer.Google("Google Physical", {type:
G_PHYSICAL_MAP, sphericalMercator : true, MAX_ZOOM_LEVEL:maxZOOM} );
var ghyb = new OpenLayers.Layer.Google("Google Hybrid", {type:
G_HYBRID_MAP, sphericalMercator : true, MAX_ZOOM_LEVEL:maxZOOM} );
var gsat = new OpenLayers.Layer.Google("Google Satellite", {type:
G_SATELLITE_MAP, sphericalMercator : true, MAX_ZOOM_LEVEL:maxZOOM} );
map.addLayers([gsat, gphy, ghyb]);
// adding overview here which causes error
var overviewoptions = {
maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
maxResolution: 156543.0339,
projection: "EPSG:900913",
displayProjection: new OpenLayers.Projection("EPSG:4326")
};
map.addControl(new OpenLayers.Control.OverviewMap({
div: OpenLayers.Util.getElement('overview'),
size: new OpenLayers.Size(200, 128),
mapOptions: overviewoptions
}));
Thanks in advance!!!
--
View this message in context:
http://n2.nabble.com/Overviewbox-causes-%22bounds-is-null-%22error-tp2526031p2526031.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users