Commit Graph

1363 Commits

Author SHA1 Message Date
Justin R. Miller
190709c6b1 fixes #1157, #1255: cache parsed tiles in memory 2015-04-16 01:15:41 -07:00
Justin R. Miller
c49e6157f1 add comment 2015-04-15 22:21:04 -07:00
Justin R. Miller
d29534e437 fixes #1267: properly break reference cycle with live tile data & style 2015-04-15 22:16:18 -07:00
Mike Morris
5972a7d16e make environment.hpp header public 2015-04-15 17:14:36 +02:00
John Firebaugh
3efbb69e0c Ensure that ~TileData happens on map thread
Fixes #1251
2015-04-10 17:28:39 -07:00
John Firebaugh
566c6718d7 Merge pull request #1244 from mapbox/uv
Replace uv_messenger with AsyncQueue; rewrite remaining uv_* in C++
2015-04-09 15:59:38 -07:00
John Firebaugh
0c087603e6 Replace uv_messenger with AsyncQueue; rewrite remaining uv_* in C++ 2015-04-09 15:30:58 -07:00
Konstantin Käfer
ec94e03a8e set the correct v7 default font
- also skip layers with empty font names
2015-04-09 22:29:05 +02:00
Ansis Brammanis
9b0376e58e fix angle of icons along lines
fixes https://github.com/mapbox/mapbox-gl-native/issues/1242
2015-04-09 12:05:16 -07:00
John Firebaugh
0b779eaa8b Remove unnecessary use of weak_ptr
The request callback runs in the same thread as ~TileData, and is not run
if the request is cancelled. So either ~TileData runs first and cancels
the request, or the callback runs first, before TileData is destructed.
Therefore the weak pointer and lock() check is unnecessary; `this` can
be used instead.
2015-04-09 11:10:51 -07:00
John Firebaugh
691756d7dd Move ClipID to clip_id.hpp/cpp 2015-04-09 10:58:11 -07:00
Konstantin Käfer
4b66c490b4 guard against invalid database files 2015-04-08 14:55:47 +02:00
Konstantin Käfer
7d58a41de5 make sqlite storage more resilient to sporadic errors
- catch SQLite exceptions and report them
- failed statements are ignored, we're really just caching here, so if it fails we're handling it gracefully elsewhere
- handle cases where the database file goes away after we opened it
- handle cases where the schema wasn't created after the database file was opened successfully
- add tests
2015-04-07 18:04:23 +02:00
John Firebaugh
c73309ef5f Remove unused 2015-04-06 15:55:28 -07:00
John Firebaugh
872cf07683 Move tileCover to its own file 2015-04-06 13:58:56 -07:00
John Firebaugh
d8411f26d2 Tile::ID ⇢ TileID
This allows making both Tile and TileID private.
2015-04-06 13:58:56 -07:00
John Firebaugh
c5292b7536 Remove always-true conditional 2015-04-06 12:59:47 -07:00
John Firebaugh
5ec04c0474 Bounds-check array access at source 2015-04-06 12:59:46 -07:00
John Firebaugh
d2314aedc6 Extract SourceInfo::tileURL 2015-04-06 12:58:52 -07:00
John Firebaugh
15969f1369 Remove Map dependency from Source::invalidateTiles 2015-04-06 10:30:02 -07:00
John Firebaugh
750cfb6f58 Remove Map dependency from Source::load 2015-04-06 10:30:01 -07:00
John Firebaugh
e72ee04482 Move SourceInfo into source.hpp/cpp 2015-04-06 10:30:01 -07:00
John Firebaugh
7e0e55e542 Eliminate StyleSource
Fixes #695
2015-04-06 10:30:01 -07:00
John Firebaugh
41c4d50f8a Remove unused 2015-04-03 13:51:33 -07:00
John Firebaugh
cca7f6978a Remove unused 2015-04-03 13:51:33 -07:00
Minh Nguyễn
6a1e7d5707 Fixed race condition after setting access token
`Map` should be able to deal with having no access token or JSON even while it’s running. Most of `Map` accounts for this situation, but `reloadStyle()` incorrectly assumes that one or the other is set. This change corrects the assumption in `reloadStyle()`.

Also expose the access token and style name to clients as ordinary KVO-compliant properties. Actually, they’re not so ordinary because they’re inspectable!

Ref #1070, #1147
2015-04-03 12:07:53 -07:00
Justin R. Miller
0a736c3a76 fixes #1181: fix lat/lng & zoom ordering problems 2015-04-02 19:56:47 -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
7f58840991 Remove unused 2015-04-02 15:30:12 -07:00
Konstantin Käfer
5ab6274f8b some cleanup 2015-04-02 15:45:39 +02:00
John Firebaugh
9331acf8e6 Add typedefs for std::chrono::steady_clock types 2015-04-02 12:28:12 +02:00
John Firebaugh
13991cf786 Rename methods to match gl-js 2015-04-01 12:37:41 -07:00
John Firebaugh
71227e4645 StyleLayer is noncopyable 2015-04-01 11:26:46 -07:00
John Firebaugh
db5e9d1302 Remove unused 2015-04-01 11:22:32 -07:00
John Firebaugh
1db044d3c0 Remove unused 2015-04-01 11:21:05 -07:00
John Firebaugh
5264982ba7 Eliminate StyleLayerGroup 2015-04-01 11:14:20 -07:00
Konstantin Käfer
c475284a58 use hashes instead of string keys 2015-04-01 17:56:51 +02:00
Konstantin Käfer
220ebf61dd replace iterator variable types with auto 2015-04-01 16:42:42 +02:00
Konstantin Käfer
268129b9c1 use cumulative hash instead of string for linedash lookup 2015-04-01 15:30:57 +02:00
John Firebaugh
2beb836a07 Parse VT tags lazily 2015-04-01 12:07:13 +02:00
John Firebaugh
3d9b441c8b Eliminate some unnecessary pointer indirection
Buckets had a pointer to the associated layout type, when they can just
have a direct member.
2015-03-31 15:23:40 -07:00
John Firebaugh
f2e658d962 Remove unused 2015-03-31 12:08:57 -07:00
John Firebaugh
fd5b2dbed0 Remove unused variable 2015-03-30 16:44:45 -07:00
Justin R. Miller
a8833c34d4 fixes #892: support mapbox:// style URLs 2015-03-30 15:33:02 -07:00
Konstantin Käfer
1b0564a850 normalize font stack
- split all fontstack names at the comma character, trim, the join
- capitalization is important and may not be changed
2015-03-30 16:31:16 +02:00
Thiago Marcos P. Santos
78dce1477c Merge pull request #1137 from mapbox/clang-3.5
Fix build failure when using clang-3.5 on Linux
2015-03-30 11:06:11 +03:00
Konstantin Käfer
743619dee9 Disable all Sources when terminating 2015-03-27 17:09:25 +01:00
Thiago Marcos P. Santos
6a5c9c44e8 Fix build failure when using clang-3.5 on Linux 2015-03-27 17:41:57 +02:00
Konstantin Käfer
4249c955d0 make sure the map terminates 2015-03-27 16:39:50 +01:00
Konstantin Käfer
a2629393b3 dispatch all AnnotationManager calls to the map thread
calls that return a value block until the operation was executed
2015-03-27 12:56:41 +01:00