Ticket #2487 (new feature)
Opened 3 years ago
maxExtent and restrictedExtent behavior in moveTo is not consistent
|Reported by:||pgiraud||Owned by:|
If restrictedExtent is set, trying to moveTo location which is outside the restrictedExtent will result in a map moving up against the reachable limits. When there's no restrictedExtent, the maxExtent is taken into account. But the moveTo method only verifies if the new lonlat is valid. If false, the map won't move. In my opinion, it should instead make advanced comparisons and then go up against the available limits.
2 cases where the issue is obvious :
- consider a simple world map, zoom in once, then try to map.setCenter(new OpenLayers.LonLat(180, 0)), the map doesn't move.
- if user is near a maxExtent limit and tries to move the map with a quick drag, then he can still move the map if he drags the map slowly.
I hope this is clear, if not I can provide detailed explanations.