Consider the following example (I tried to keep it as simple as possible).
OSM map is in the Spherical Mercator Projection, the bounds
(-1500000, 4000000, 5600000, 11000000) should cover most of Europe. I set these bounds both as the
maxExtent and the
restrictedExtent of the map.
Furthermore, I set
After launching this example, the map really centers to Europe and restricts panning to other parts of the World. But, it absolutely disregards the
maxScale attribute and allows zooming far away.
Now, I try to remove the
restrictedExtent. I should be able to pan the map freely. This is true. However, now the
zoomToMaxExtent() doesn't work, although the
maxExtent is still set!
How come neither
zoomToMaxExtent() would work in this example? Am I just gravely misunderstanding the OpenLayers documentation?