[OpenLayers-Users] view outside maxExtent

Jim White jbw2003 at earthlink.net
Fri Dec 2 08:50:57 EST 2011


Hi,

I have a map that I want the initial view to be of a smaller wfs layer, 
but allow the user to view a larger wms layer. If I set the map 
maxExtent to the larger area I can view the all the wms map. If I set 
the maxExtent to the smaller area the initial view is correct, but then 
you cannot view all parts of the larger background map.

I tried to add

map.zoomToExtent(new 
OpenLayers.Bounds(-8511523.3718339,4395058.7021558,-8472425.8318731,4416613.9441284));

However the map always zooms to maxExtent. How to do this?

Thanks,
Jim White


More information about the Users mailing list