[OpenLayers-Users] Zoom button "Globe" and zoomToMaxExtent

Jürgen Dankoweit Juergen.Dankoweit at T-Online.de
Sun Sep 14 01:08:27 PDT 2014


Hello to the list,

for my project I want to use the button with the globe icon shown by the 
object OpenLayer.Control.PanZoom(). My understandig is that this button 
will zoom to the maxextent of a map. But when I set this maxextent by

obj.map.maxExtent = OpenLayers.Bounds(...).transform(...)

the new bounds are ignored.

The new maxExtent is set by a list where a user can select a region. 
When the user zooms more into the region the user should have the 
possibility to zoom back to the region selected before. Therefore the 
"globe" button provided by the PanZoom object is used.

How to set this maxextent correctly so that it works as expected?

In advance many thanks for the answers.

Best reagrds

Juergen

--------------------------------------------------------------------------
Homepage: www.dankoweit.de


More information about the Users mailing list