Justin R. Miller
b43ba4089c
fixes #1308 : normalize tile memory cache keys & allow dupe inserts
2015-04-22 15:35:34 -07:00
Konstantin Käfer
2831073f85
Merge pull request #1295 from mapbox/1199-whee
...
Ensure correct spin direction
2015-04-20 12:01:46 +02: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
Konstantin Käfer
71d127220b
rename Mode::Static => Mode::Still
2015-04-17 17:55:24 +02:00
Konstantin Käfer
5d769f9b62
explicitly call .discard() to resize the view on static renders
...
- this is only a stopgap; we need to properly pass state between threads
- doesn't fix changing the pixel ratio
2015-04-17 13:40:42 +02:00
Konstantin Käfer
46bf226910
align static render mode and still image render mode
...
- static rendering now also runs in a separate thread; you have to start it with map.start(Map::Mode::Static) and join the thread with map.stop() before destructing the Map object
- map.renderStill() takes a callback with will be invoked on the *map* thread, so you'll have to figure out your own method of dispatching back to the main thread.
2015-04-17 13:40:42 +02:00
Justin R. Miller
14e972ad97
don't auto-resize & fill cache with zeros
2015-04-16 12:14:35 -07:00
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
0c087603e6
Replace uv_messenger with AsyncQueue; rewrite remaining uv_* in C++
2015-04-09 15:30:58 -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
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
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
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
220ebf61dd
replace iterator variable types with auto
2015-04-01 16:42:42 +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
743619dee9
Disable all Sources when terminating
2015-03-27 17:09:25 +01: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
Konstantin Käfer
54cd6a59de
make sure that we always have a style object after prepar()
2015-03-26 16:12:49 +01:00
Justin R. Miller
10a30daed6
refs #894 , fixes #1074 : callout views for iOS
2015-03-24 18:43:24 -07:00
Konstantin Käfer
2990f38824
Merge pull request #1073 from mapbox/debug_crash
...
Fix crash on debug build
2015-03-24 15:14:48 +01:00
Justin R. Miller
c5597ad6f1
annotations perf improvements & iOS app testing
...
squash of #1061
2015-03-23 20:49:02 -07:00
Thiago Marcos P. Santos
0603d8f5e3
Fix crash on debug build
...
styleInfo is being passed to request() by reference but it is stack
allocated and goes out of scope. Pass the bits we are interested by
value instead.
2015-03-24 00:44:07 +02:00
Justin R. Miller
486a385f98
Merge branch 'master' into 1022-annotations-thread-safety
2015-03-23 11:13:51 -07:00