Commit Graph

7032 Commits

Author SHA1 Message Date
Tobrun
0ebf5fcaae [android] #3507 - fix location listener leak in UserLocationView 2016-01-18 12:17:59 +01:00
Tobrun
89b051f386 [android] #3593 - added double map view example 2016-01-18 10:58:37 +01:00
Tobrun
74a9c505f9 [android] #3573 - Marker clicks stop working after orientation change 2016-01-18 09:10:17 +01:00
Minh Nguyễn
cb126eafe0 [ios] Refactored unrotation
Avoid unrotating due to programmatic rotation, even programmatic rotation that might expose empty portions of the map. Only snap to north due to a gesture.
2016-01-16 22:00:47 -08:00
Minh Nguyễn
ed32fa06ed [ios] Avoid unrotating in heading or course tracking mode
Fixes #3587.
2016-01-16 15:56:25 -08:00
John Firebaugh
9d13c639d1 [core] Add missing returns in error case
Fixes #3585
2016-01-15 16:59:21 -08:00
John Firebaugh
4328e6fd0d [core] tileSize is a source property, not a TileJSON property 2016-01-15 11:48:47 -08:00
Brad Leege
2dae355cbd [android] #3052 - Generating actual SHA for 2.10 zip file 2016-01-15 12:46:16 -06:00
Brad Leege
300d908bfc [android] #3052 Adding distributionSha256Sum 2016-01-15 12:23:09 -06:00
Tobrun
a79ef8bcc3 [android] #3052 - upgrade gradle to 2.10 2016-01-15 17:35:44 +01:00
Konstantin Käfer
a88e58ef3a [core] use stale glyphs
Updating glyphs is still unsupported, and there's no good use case for doing so. When we're using a stale glyph PBF, and the fresh answer contains changed to that glyph, we will continue to use the old glyph.
2016-01-15 17:04:08 +01:00
Konstantin Käfer
32a2359e86 [core] don't store error state
Previously, we could first get a stale response from cache, then immediately a "connection error" response that overwrote the error state variable. In the tileLoadingCompleteCallback, we'd only see the second overwritten error state and abort. This could lead to the map sometimes not being rendered at all until the user interacts with the map.
2016-01-15 17:04:08 +01:00
Konstantin Käfer
bd1f71cdbd [core] use stale sprite data
This is a naïve implementation that essentially merges updated data into existing data. It will *not* remove icons from the stale sprite if they aren't present in the fresh sprite (we aren't tracking the source of a sprite, and the user could have changed it as well). Similarly, it will not update icons that have changed in dimension. This is a rare edge case and probably not worth implementing.
2016-01-15 17:04:07 +01:00
Tobrun
2631f5bf93 [android] #3517 - recreating InfoWindow with correct MapView instance 2016-01-15 13:14:13 +01:00
Konstantin Käfer
40e908677e [core] abort current parse when we get a new NotFound response 2016-01-15 12:48:24 +01:00
Konstantin Käfer
01f31a82a8 [core] update the modified/expires debug info for unmodified responses as well 2016-01-15 12:48:24 +01:00
Konstantin Käfer
3f5d02ee65 [core] use stale raster tiles 2016-01-15 12:48:23 +01:00
Konstantin Käfer
180b3f125f [core] don't mark tiles with failed requests as obsolete
Otherwise, this will remove them from the map and overwrite the old data. This could happen e.g. when we have connection trouble and a tile needs to be refreshed, or we're displaying stale information and the connection is down.
2016-01-15 12:48:23 +01:00
Konstantin Käfer
5fe586633c [test] ensure static rendering finishes when a tile can't be loaded 2016-01-15 12:48:23 +01:00
Konstantin Käfer
8a964fb931 [core] use stale and refreshing TileJSON/GeoJSON data
We're now supporting using stale TileJSON and GeoJSON data. When we receive a new answer with an updated TileJSON file, we're replacing the Source's metadata with the new one and trigger updates to make sure we're loading the correct tiles. Similarly, GeoJSON data will be reparsed.
2016-01-15 12:48:23 +01:00
Konstantin Käfer
21e4029acf [core] use stale styles
This adds support for using cached styles that are stale. They're treated like changing styles; when the refreshed style changed compared to the one we've already had, we're swapping out the entire style, which might cause a slight flicker.
2016-01-15 11:59:26 +01:00
Tobrun
e22b0270f4 [android] #3559 - don't show InfoWindow when marker is invalid 2016-01-15 11:19:47 +01:00
Tobrun
3fa63fa5e8 [android] #3052 - update gradle to 2.10 2016-01-15 11:15:11 +01:00
Konstantin Käfer
957415823a [core] Support multiple paths in SQLiteCache::getShared()
If you use many different caches, expired weak_ptrs will pile up in the unordered_map, but that is an edge case, and you probably shouldn't do that anyway.
2016-01-15 10:44:16 +01:00
Konstantin Käfer
8939a7b706 [core] move SharedSQLiteCache::get to SQLiteCache::getShared 2016-01-15 10:38:09 +01:00
John Firebaugh
f62d41ae05 [core] Restore existing response body
Until #2721 lands we still need this.
2016-01-14 18:38:56 -08:00
Ansis Brammanis
e44db93f1c [core] place symbol layers in correct order
Previously, the placement of symbols depended on the order in which the
glyphs they need were loaded. The placement order should be based on the
style.

To fix this, symbol layers are placed in `placementPending` after they
are parsed. After all layers are parsed, symbol layers (stored in
`placementPending`) are placed and returned.
2016-01-14 17:51:29 -08:00
Minh Nguyễn
15f4ca51f9 [ios] Fixed static analyzer warnings 2016-01-14 16:48:16 -08:00
Minh Nguyễn
714dfab8ae [osx] Fixed static analyzer warnings 2016-01-14 16:48:16 -08:00
Jason Wray
b52b634e5b Update changelog for #3495
[skipci]
2016-01-14 19:02:01 -05:00
Jason Wray
b57e237b14 [ios] send turnstile event when telemetry is paused 2016-01-14 18:30:51 -05:00
Jason Wray
75ed155f4f [ios] remove testCompassTap test
Fails on CI because KIF is unstable. Refs
61615a44fd, #2769, #2734
2016-01-14 17:58:09 -05:00
John Firebaugh
0066637e58 [core] Let SQLiteCache decide when store or refresh responses 2016-01-14 13:46:03 -08:00
John Firebaugh
1c887ff728 [core] Use notModified rather than storing the previous response body 2016-01-14 13:46:03 -08:00
John Firebaugh
2aafdbc1b8 [core] Add an explicit "not modified" indicator to Response 2016-01-14 13:46:03 -08:00
John Firebaugh
2ee1fe4178 [core] std::shared_ptr<const Response> ⇢ const Response& 2016-01-14 13:46:03 -08:00
John Firebaugh
7fb5e973ed [core] Eliminate FileCache interface
There is only one implementation and we're unlikely to add more.
2016-01-14 13:46:03 -08:00
Thiago Marcos P. Santos
f9574e350c [core] Fix crash on transitionFrameFn callback
This is a tricky one:

We are storing a lambda at the member variable `transitionFrameFn` and
capturing `this` at this lambda function.

At some point when running the callback, we set `transitionFrameFn` to
`nullptr`, effectively destroying the callback that is being executed.

After this point, `this` is no longer valid, as the memory gets
cleared and it might point to the correct location (or not). That
is why it works on some compilers but not on g++ 5.3.1. Touching
any `this->[smth]` is undefined after that.

The fix is just move `transitionFrameFn = nullptr` to the last
thing we do on the callback. This behaves similarly to calling
`delete this` on a class method.
2016-01-14 18:59:38 +02:00
Tobrun
d764e9829e [android] #3450 - fix rotation when enabling user location 2016-01-14 16:27:29 +01:00
Konstantin Käfer
4515bb00c0 [node] extract the error message from the Error object
this avoids double "Error: Error: reason" messages
2016-01-14 14:35:02 +01:00
Konstantin Käfer
e195d86100 [test] don't pass raw strings as error messages 2016-01-14 14:35:02 +01:00
Tobrun
35855889df [android] #3461 - upgrade to okhttp3 for faster tile loading! 🚀 2016-01-14 14:21:46 +01:00
Tobrun
1f31de288f [android] #3535 - improve disabling tracking modes 2016-01-14 13:25:58 +01:00
Tobrun
5d9485e02e [android] #3539 - silence warning about unused param message that was breaking our build on CI 2016-01-14 11:10:45 +01:00
Minh Nguyễn
4f08ef150d [core] Fixed build error in Xcode 7.3
Removed std::move() call per Xcode fix-it suggestion.
2016-01-14 10:52:13 +01:00
Minh Nguyễn
ff8b014c5b [core] Consolidated easeTo and flyTo
Pushed much of easeTo() and flyTo() into startTransition() to avoid code duplication.
2016-01-14 00:40:46 -08:00
Minh Nguyễn
02d00662fb [core] Moved camera methods next to each other 2016-01-14 00:40:45 -08:00
Minh Nguyễn
8bad15bf87 [core] Consolidated zoom and angle anchor logic
Made anchor a CameraOption for easeTo().
2016-01-14 00:40:03 -08:00
Minh Nguyễn
a3d4aeefec [osx] Consistent origins in gesture recognizers
Cleaned up gesture recognizers, flipping the origins of anchor points only and always before calling mbgl methods. This exposed the fact that the cursor locking feature during drag-zoom/rotate/tilt was broken, so I fixed it to match MapKit behavior exactly and also account for modifier changes in mid-gesture.
2016-01-14 00:39:57 -08:00
Minh Nguyễn
ac4b1b7479 [core] Standardize transform origin
All Transform methods that take a PrecisionPoint now assume a “flipped” origin at the upper-left corner of the view. Previously, some methods assumed an origin at the lower-left corner.
2016-01-14 00:39:56 -08:00