-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maxBounds in config #291
Comments
Bump here. Would be great for demo purposes. |
Grabbing. |
Or should we restrict it in a way that just map center doesn't go out of it, not screen edges? That would solve the rotation problem. |
Native equivalent: mapbox/mapbox-gl-native#236 I have not approached rotation with bounds before, as the iOS SDK did constraints, but not free rotation. Do any other vendors do this? I've not seen it before, and may be why SDKs don't tackle it :-) We could disallow rotation when constrained. This is handled in native at low ( |
Not sure disallowing rotation when constrained is a good option — e.g. suppose we have an SF data viz — then rotation would be disabled as well, even though user could browse the map zoomed in enough most of the time. |
In native, it was a little confusing the first time I tried rotating the map at low zooms and it not responding, but I think this is preferable to bounds based on map center. I'm wondering if we could shoot for a configurable spring effect? This way there is feedback when you've hit the edge. |
The gold standard for this is Apple's MapKit -- exactly. Check out how it works in the Maps.app -- it does this exact springiness as a physical cue. This is what I tried to implement in mapbox/mapbox-gl-native#279 but was causing locking issues. |
Implemented in #646, lets track there |
zoom to bounds of polygons too small to see
The equivalent of http://leafletjs.com/reference.html#map-maxbounds would be nice for editorial/datavis projects. Low priority.
cc @mourner @ansis
The text was updated successfully, but these errors were encountered: