[OpenLayers-Users] Fwd: WMS layer getDataExtent?

Christopher Schmidt crschmidt at metacarta.com
Thu Oct 25 08:57:52 EDT 2007


On Thu, Oct 25, 2007 at 09:05:58AM +0200, Alessandro Pasotti wrote:
> I'm playing with a WMS layer and I'm trying to auto-center the map depending 
> on the layer extent.
> 
> Is there a way to do this automatically? 
> 
> I mean extracting layer extent from a getCapabilities request or sometinhg the 
> like.

OpenLayers doesn't talk to the WMS server at all, so it doesn't have
this information. I'm not aware of any current efforts to attempt to
download and parse GetCaps specifically for extents. (Lorenzo is looking
into it for adding layers, i believe.)

> I tried getDataExtent() on the layer, but it does'nt seem to work but I guess  
> I misunderstood some important points.

getDataExtent doesn't have any meaning for WMS layers at the moment, but
I had no plans to make it anything other than the current extent of the
tile grid.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list