Hi,
I'm using Openlayers Overview map control with Google Physical map which
is also my base map.
And i am using a restricted extent on the overview map to show India.
Now, when i change my map's base layer to say Google Satellite, I change
the layer in the overview map
to match the map's base layer. The problem i am facing here is, whenever
the base layer changes, the restricted extent on my overview map moves
to Australia and India is no where seen.
Does anyone know why this is happening?
Here's the code:
This is when i initialize the map.
overviewLayer = new OpenLayers.Layer.Google("Google Physical",{type:
G_PHYSICAL_MAP,MIN_ZOOM_LEVEL: 2,
'sphericalMercator': true,minExtent:new
OpenLayers.Bounds(6567849.955888889,1574216.547942332,
11354588.059333334,3763310.626620795), maxExtent:new
OpenLayers.Bounds(6901808.428222222,-7.081154550627198,
11131949.077777777, 4439106.786632658)});
addOverview(overviewLayer);
function addOverview(overviewLayer){
//to remove already existing overviewmap
if(overview != ''){map.removeControl(overview);}
var overviewOptions = {
layers: [overviewLayer],
projection: "EPSG:900913",
units: "m",
maxResolution: "0.17578125"
};
overview = new OpenLayers.Control.OverviewMap(overviewOptions);
overview.isSuitableOverview = function(){
return false;
};
map.addControl(overview);
overview.maximizeControl();
}
Thanks & regards,
Subha
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users