Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Rotated map with maxBounds does funny movement #2

Open
fnicollet opened this issue Jul 24, 2016 · 1 comment
Open

Rotated map with maxBounds does funny movement #2

fnicollet opened this issue Jul 24, 2016 · 1 comment

Comments

@fnicollet
Copy link
Owner

Originally reported by @hyperknot:
https://github.com/hyperknot/Leaflet/issues/5

maxBoundsViscosity: 1
+
setMaxBounds
+
setBearing
+
pan anywhere on low zoom
=> funny dancing movement

@sisou
Copy link
Collaborator

sisou commented Apr 3, 2017

I am currently looking into this, but have a functional question:

Given the maxBounds are outside the current view, should the rotated view always be fully contained within these bounds (except when zooming out past the maxBounds)? Because that would mean that when rotated, the corners of the maxBounds are not viewable. But maybe that's what you get when using maxBounds.

Another way to do it would be to limit the center of the view to be within the maxBounds. That would mean that corners are fully viewable, but half the view area could be outside of the maxBounds.

Or maybe some mix-solution of the two is possible, where the view is generally restricted by the maxBounds, but still somehow allows corners to be viewable...?

Opinions?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants