Commit Graph

23 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
2aad2f4e14 Pass {Duration,TimePoint} by const ref if possible 2015-07-14 16:48:34 +03:00
Konstantin Käfer
675ddddee7 Make pixelRatio constant across a Map object lifetime
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00
Minh Nguyễn
08acb65b1c Eliminated map overrotation on drift pan
Wrap the angle on each interpolated step instead of when normalizing.
2015-07-06 13:08:59 -07:00
Minh Nguyễn
46a6173bd7 [wrap)
If (wrap] is desired, it is the responsibility of the caller to handle the case in which min is returned.
2015-07-06 13:07:34 -07:00
John Firebaugh
95351dd906 Send MapChangeRegionIsChanging notifications 2015-06-26 10:32:07 -07:00
John Firebaugh
d193083513 Remove duration argument from View::notifyMapChange
Fixes #1026
2015-06-26 10:32:07 -07:00
John Firebaugh
e6a576f6eb currentState() ⇢ getState() 2015-06-26 10:32:07 -07:00
John Firebaugh
07a6d2ef64 Move Transform from MapData to Map
Pass current state to MapContext where needed. Remove mutex from
Transform.
2015-06-26 10:32:07 -07:00
John Firebaugh
e87a36444f Move getMin/MaxZoom to TransformState 2015-06-26 10:32:07 -07:00
John Firebaugh
4ba78b6bcf Transform needs only a single TransformState 2015-06-24 13:08:36 -07:00
Konstantin Käfer
f4707f72e0 Replace mbgl::util::make_unique<> with std::make_unique<> 2015-05-26 17:57:38 +02:00
Minh Nguyễn
b6765a2eb1 Merge pull request #1453 from mapbox/1ec5-whee-2
Prevent full-circle spin during animated rotation
2015-05-19 16:18:26 -07:00
Konstantin Käfer
24ea920810 ignore Transform changes with NaN parameters 2015-05-08 20:25:47 +02:00
Minh Nguyễn
d876274ad1 Prevent full-circle spin during animated rotation
#1295 made #1199 a lot less common, but it was still possible for the map to do a full 180° when drift-rotating past due-south. With this change, the map is atomically rotated to a bearing in the same cycle as the final bearing.

/cc @friedbunny
2015-05-06 16:38:59 -07:00
Dane Springmeyer
33f30aae93 fix integer division to work in doubles in transform.cpp 2015-05-03 23:23:13 -07:00
Ansis Brammanis
ed9ef0f7d1 fix pixelForLatLng during animated zoom
fix #1160
2015-04-30 16:03:35 -07:00
Minh Nguyễn
8b44cfeb76 Ensure correct spin direction
Ported mapbox/mapbox-gl-js#821 as well as `util.wrap()` from mapbox-gl-js.

Fixes #1199.
2015-04-18 22:14:39 -07:00
John Firebaugh
12c07b916b Rework easing transition code
This brings the easing transition code a bit closer to how easings work
in gl-js. Instead of having an array of individual transitions for scale,
rotate, and pan, there is a single transition function that does all the
required calculations. This permits us to:

* Eliminate the "timeout" transition. (Fixes #126)
* Replace start/stopPanning() et al with setGestureInProgress(). Apps or
  SDKs are expected to make paired calls to setGestureInProgress(). This
  state will be ORed with the active easing state to determine when to
  use texture interpolation. (Fixes #79)
* Run style recalculations only when an ease transition that affects the
  zoom is in progress. (Fixes #1155)
2015-04-02 16:12:29 -07:00
John Firebaugh
9331acf8e6 Add typedefs for std::chrono::steady_clock types 2015-04-02 12:28:12 +02:00
Justin R. Miller
6e41664cb0 fixes #476 & #853: pixel/meter/latlng conversion routines in core & iOS 2015-02-16 09:52:36 -08:00
Leith Bade
89bbd29278 Use std::chrono 2015-02-04 09:39:25 +11:00
Leith Bade
0771e50460 Rename View functions to match conventions. Also tidy up view classes and remove C style casts. Closes #656 2014-12-23 09:29:45 +13:00
Konstantin Käfer
abafb52f37 make most headers private 2014-12-04 20:02:50 +01:00