| 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.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
Use mbgl::Duration and mbgl::{,Milli}Seconds whenever possible.
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
Made anchor a CameraOption for easeTo().
|
|
|
|
|
|
| |
Eliminated many redundant methods on Transform. Minimized usage of TransformState::x and TransformState::y. Added convenient constructors for AnimationOptions. When scaling, passing in view’s origin as the anchor no longer anchors the scaling operation at the view’s center. To specify no anchor, use NaN.
Increased precision of worldSize(), now that it’s used much more heavily in transform methods.
|
| |
|
|
|
|
| |
The speed and curve fields in CameraOptions have been replaced with velocity and minZoom fields, which expressed in screen units. Scaling and easing make it difficult to derive options that are expressed in physical units.
|
|
|
|
|
|
|
|
| |
Rewrote the flyTo implementation to more closely match GL JS’s implementation and the paper on which it is based.
Rewrote CameraOptions documentation. Only document units for generic types like double. The semantics of LatLng and Duration are already baked into the types; one just needs to look up the types’ definitions. Also, the […) is set notation, so the braces are supposed to be mismatched.
Fixes #3296.
|
| |
|
| |
|
|
|
|
|
|
| |
Corrected some fairly opaque code that was incorrectly ported from GL JS the first time around in #3171, causing the trajectory to extend far into the Earth’s orbit. Also transition pitch while flying, call transition frame/finish callback functions, and recognize the same “speed” and “curve” parameters that GL JS does.
Fixes #3296, fixes #3297.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
It's a premultiplied image. This implies that we were misusing encodePNG
in most cases, as we were passing premultiplied pixels which were then
interpreted as unmultiplied. I changed encodePNG to accept premultipled
pixels, and unpremultiply in the implementations.
|
|
|
|
|
|
| |
* Consolidate Image and StillImage
* Typecheck unassociated vs premultiplied images
* Rewrite default platform image decoding implementation
|
|
|
|
|
|
| |
Added transition frame and finish functions to CameraOptions. Added Objective-C equivalents to the three main entry points to easeTo() in MGLMapView.
Fixes #1581.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|