| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Use optional values for anchor & padding in Map and Transform functions
instead of NaNs. Added unit tests to stress some edge cases.
|
| |
|
| |
|
|
|
|
|
| |
Use 'LATITUDE_MAX', 'LONGITUDE_MAX', 'DEG2RAD' and 'RAD2DEG' whenever
possible.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Introduced a setter/getter for constrain mode. On iOS and OS X, the zoom level inspectable causes the zoom level to be set independently from the longitude and latitude. Thus, the latitude inspectable had no effect because the latitude was constrained to 0 at z0. Temporarily removing the heightwise constraint allows the map to center on the intended location before zooming, which is the usual case for storyboards and XIBs. On iOS, the only guarantee we have timing-wise is that all the inspectables are applied after initialization but before the view is added to a window. So we reimpose the heightwise constraint as soon as the view is added to a window, that is, before the user has a chance to pan the map out of bounds.
Fixes #3868.
|
|/ |
|
|
|
|
|
|
|
| |
* Use "named constructors": empty, world, hull
* Make the two-argument constructor lenient (i.e., it is a hull operation)
* Add various accessors
* Enforce a single empty representation
|
| |
|
| |
|
|
|
|
| |
also change the default maxZoom to 20 to match -js.
|
|
|
|
| |
The tilt gesture on both iOS and OS X now respects the content insets. On iOS, in user tracking mode, it additionally respects the user dot’s position if it’s aligned to the top or bottom of the view.
|
| |
|
|
|
|
|
|
|
|
| |
Map::pixelForLatLng()
Map and Transform methods assume an origin at the top-left corner of the view, like iOS, Android, and GLFW but unlike OS X. Transform is responsible for flipping coordinates between the top-left origin of Map and the bottom-left origin of TransformState.
Fixes #3574.
|
|
|
|
| |
Methods that offer a convenient way to jump or ease now accept an optional padding parameter. MGLMapView specifies the padding to ensure that keyboard-based zooming and rotation respects the toolbar.
|
|
|
|
|
|
| |
Moved EdgeInsets to geo.hpp so CameraOptions and Transform can refer to it. Added a padding option to CameraOptions that alters the frame of reference for the center option. Added optional padding parameters to LatLng getters and setters.
Working towards #2600.
|
| |
|
|
|
|
| |
Also factored out the maximum pitch into a constant.
|
| |
|
|
|
|
| |
Another pass at #3146, including a unit test.
|
| |
|
|
|
|
| |
You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #3084
|
|
|
|
|
| |
This allows MapData members to hold GL resources which must be released
on the MapContext thread -- necessary for the following commit.
|
| |
|
|
|
|
|
| |
Map debug options are now cycled up to all debug options enabled, then
back to none.
|
|
|
|
|
|
|
|
|
|
| |
ConstrainMode gives flexibility to our engine to choose between
constraining both vertically and horizontally, or just vertically
(default behavior).
Constrain in both axis means we can no longer pan the map beyond the map
boundaries. This fixes an issue where e.g. annotations disappear upon
crossing the map boundaries.
|
|
|
|
|
| |
We could reuse all the operators defined in vec2<>, including operator
bool() that checks if the contained values are !NaN.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Pass-by-const-ref is not always possible because CameraOptions gets its
members modified along the way.
Also fixes a case in Map::jumpTo where Update::Zoom should be called if
zoom is affected.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The final frame is self-destructing – it destroys the frame and finish functions – so technically we’re no longer inTransition(). Yet there still needs to be an update after that final frame.
Also, avoid a redundant change notification on the last frame. (It would come too late, after the DidChange notification, anyhow.)
Fixes #2946.
|
| |
|
|
|
|
|
|
|
| |
The location under your finger stays under your finger as you pan.
The location you double tap to zoom stays at the same point.
The location at the center of a pinch zoom stays at the center.
The location at the center of a rotation stays at the center.
|
|
|
|
|
|
|
| |
Adding new mbgl::GLContextMode enum to mbgl::Map ctor, which gets stored
in MapData. In shared GL context environments, we cannot assume that the
GL state that has been left since the last draw is the same, so we reset
the GL configurations to their default values.
|
|
|
|
|
| |
Some platforms requires specific information that was previously not
available in public API, but stored internally in TransformState object.
|