All the layers in my application are EPSG:31466. However, if I retrieve the capabilites:
var wms = new OpenLayers.Format.WMSCapabilities();
OpenLayers.Request.GET({
url: myUrl,
success: function(e){
var response = wms.read(e.responseText);
var layerObj = response.capability.layers[0];
console.log(layerObj.llbbox);
}
}
The BoundingBox' Coordinates are given in a totally different format.
In EPSG:31466 I would expect them to be similar to new OpenLayers.Bounds(363060,5770362,363496,5771118)
, but in fact they are like this: [-23.015284514192917, 48.276782941782315, -22.953739137948624, 48.29765968309495]
.
Looks like a different format, but why and how do I change this?
console.log(layerObj.llbbox);
var my_extent=new OpenLayers.Bounds(layerObj.llbbox).transform(new OpenLayers.Projection("EPSG:4326"),map.displayProjection);
console.log(my_extent);
Console Output:
[-23.015284514192917, 48.276782941782315, -22.953739137948624, 48.29765968309495]
Object { left=-23.015284514193, bottom=48.276782941782, right=-22.953739137949, more...}
Lat-Lon Bounding Box
and not fromNative Bounding Box
, which I want to have : docs.geoserver.org/latest/en/user/webadmin/data/…