[OpenLayers-Users] bounds of an overlaylayer
runningcodez
sumith.paul at gmail.com
Sat Jan 3 07:03:44 EST 2009
Hi,
I have a base googlemap layer over which i have 1 overlay.The overlay layer
has its own bound values
given by my geoserver.my requirement is to get the the bound values of the
overlay layer and zoom to that bounds,along with the base google layer,on a
buton click.Could anybody guide me as to how would i fetch the original
bounds generated by the geoserver...My code is is as follows..
thanx in advance
function setupMapsOnload(){
var options = {
projection: "EPSG:900913",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
20037508, 20037508.34),
controls:[]
};
map = new OpenLayers.Map('map', options);
gooPHY = new OpenLayers.Layer.Google(
"GoogleMap" ,
{
type: G_PHYSICAL_MAP,
'sphericalMercator': true,
minZoomLevel: 4,
maxZoomLevels:15
},
{
isBaseLayer: true,
buffer: 1,
}
);
ovlay = new OpenLayers.Layer.WMS(
"ibin:gridcenter",
"http://localhost/geoserver/wms",
{
layers: 'ibin:gridcenter',
srs: 'EPSG:4326',
height: '550',
width: '350',
styles: '',
format: format,
tiled: 'true',
tilesOrigin : "72.7,7.696875",
transparent: true
},
{
'opacity': 1, 'isBaseLayer': false,
'wrapDateLine': true
}
);
map.addLayers([gooPHY,ovlay]);
}
function fetchbounds(){
//the button click takes me here
//here is where i shud fill in
}
</script>
--
View this message in context: http://n2.nabble.com/bounds-of-an-overlaylayer-tp2105565p2105565.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list