Commit Graph

1280 Commits

Author SHA1 Message Date
Justin R. Miller
02cccfe7e8 properly clean up tile annotations on delete 2015-03-17 17:46:33 -07:00
Justin R. Miller
76f8a3d846 fix passing of annotation manager 2015-03-17 17:45:09 -07:00
Justin R. Miller
e049ce6df1 refs #893 #992: point annotations API 2015-03-17 17:30:24 -07:00
Konstantin Käfer
48c55af5c1 fix sprites for pixel ratios that are not 1 and 2
- OpenGL ES 2 doesn't allow NPOT textures with wrap-around
- The Sprite object reported the map's pixelRatio, even though it loaded @2x assets
- Copying icons from the sprite into the atlas now uses bilinear scaling to scale up to the actual size
2015-03-17 12:30:40 +01:00
John Firebaugh
0c985c024b Revert "Move atlas ownership to Style"
This reverts commit bffee07154.
2015-03-13 13:05:32 -07:00
John Firebaugh
6325f1e25a Index glyph use by tile pointer value, not tile ID
There can be multiple tiles with the same ID, but from different
sources.

Fixes #957
2015-03-13 10:55:49 -07:00
John Firebaugh
96682a02af Remove unused declaration 2015-03-13 10:55:49 -07:00
John Firebaugh
998092e5b2 Remove needless indirection 2015-03-13 10:55:49 -07:00
John Firebaugh
762e4bdfbe Clean up GlyphAtlas 2015-03-13 10:55:49 -07:00
John Firebaugh
bffee07154 Move atlas ownership to Style
This follows gl-js and just makes sense -- whenever the style changes
the atlases should be blown away.

Refs #957
2015-03-13 10:55:47 -07:00
Konstantin Käfer
069505fe75 fix rare issue that had the notify and cancel callbacks called in the wrong order 2015-03-13 15:30:10 +01:00
John Firebaugh
ba933b3f45 Merge pull request #984 from mapbox/log_stderr_printf
Get rid of printf and cout by using Log::*
2015-03-12 15:39:07 -07:00
Konstantin Käfer
74ef8840ce tolerate missing sprites
Do not try to fulfil the promise twice in case both requests to the sprite JSON and image fail. this will crash the program. Instead, we always continue with the promise, instead of throwing an exception. This allows the program to continue parsing tiles, but without an image sprite available. This means the map will render, but without the sprite images
2015-03-12 15:27:56 +01:00
Thiago Marcos P. Santos
124b49562d Get rid of printf and cout by using Log::*
Use our logging system that will route the message accordingly on
the target platform.

Fixes #613
2015-03-12 14:19:32 +02:00
Thiago Marcos P. Santos
2b6afe6a54 Merge pull request #972 from mapbox/log_cleanup
Refactoring of the log system
2015-03-12 14:18:25 +02:00
Thiago Marcos P. Santos
79f3149d9d Update the FixtureLog
Now the FixtureLog is an Log::Observer instead of a backend. The
observer can sniff and filter log messages, that can be used
for fail a test if it emits a warning for example.
2015-03-12 13:28:41 +02:00
Thiago Marcos P. Santos
51bc265db3 Make the logging system static
No initialization is needed anymore and we can use the logging functions
safely at any point of the code (threading is not handled though, so you
might get multiplexed messages if you log from two threads
simultaneously).
2015-03-12 13:28:41 +02:00
Thiago Marcos P. Santos
2948e7d121 Simplify the logging mechanism
Move the implementation of the more specialized methods to the base
class and let the platform implement only the most generic method that
takes all the possible arguments.

These specialized methods will then map to the generic implementation
that must be provided by the platforms we support.
2015-03-12 13:28:40 +02:00
Konstantin Käfer
47ede853c4 fixes black flicker on rotating the device
fixes #838

instead of rendering ad libitum on the map thread, we are now driving rendering from the UI thread on iOS via the map.renderSync() function. There are still white bars during the rotation, but the general content of the view is kept visible.

- upgrades GLFW to 3.1
- removes swapped/needsSwap in favor of a more explicit scheme
- View#invalidate() now replaces View#swap() and is called whenever the View needs to trigger a rerender. GLFW and Android to this right away, while iOS goes back to the main thread and does the Map redrawing as part of the GLKView update
- sets all iOS deployment targets to 7.0
- disables SQLite3 version check, since the library version changed on iOS 8.2
2015-03-12 12:16:38 +01:00
John Firebaugh
d6c037d2bc Don't copy VT keys / values into each feature
Instead, maintain a key index ⇢ value index map and look up the
value in getValue().
2015-03-10 16:12:52 -07:00
John Firebaugh
7212accffd More include fixes 2015-03-10 16:07:33 -07:00
John Firebaugh
c13227e35f Move parseValue(pbf) to vector_tile.cpp
This code is specific to the vector tile format.
2015-03-10 12:14:13 -07:00
John Firebaugh
9e1f17a25b Remove unused header 2015-03-10 12:13:50 -07:00
John Firebaugh
062d33c8db virtual ⇢ override in derived class 2015-03-10 10:33:04 -07:00
John Firebaugh
05df041c15 Don't use const on value-type returns 2015-03-10 10:32:25 -07:00
John Firebaugh
5fa628bc00 Inline PBFGeometry 2015-03-10 10:31:24 -07:00
John Firebaugh
4d3dcea82c Revert FeatureType rename 2015-03-09 18:32:20 -07:00
John Firebaugh
b7f04ee7c2 Use single geometry format 2015-03-09 18:32:09 -07:00
John Firebaugh
50b5c15653 Rework GeometryTile* interface 2015-03-09 18:32:08 -07:00
Justin R. Miller
2d8bf823fc unique -> shared ptr 2015-03-09 11:57:34 -07:00
Justin R. Miller
0652174465 reference cleanups 2015-03-09 11:57:34 -07:00
Justin R. Miller
7361f8566b move to shared pointers for queried layers passed to buckets 2015-03-09 11:57:34 -07:00
Justin R. Miller
a45ae199cf move from range-based for loop to iterator for to be clearer 2015-03-09 11:57:34 -07:00
Justin R. Miller
fbb2d17f43 fix iterator comparator 2015-03-09 11:57:34 -07:00
Justin R. Miller
a6b6a8d67e move to abstract interfaces to more be in line with original API 2015-03-09 11:57:34 -07:00
Justin R. Miller
e01fe2fb56 doesn't make sense to move shared pointers 2015-03-09 11:57:33 -07:00
Justin R. Miller
cf623e96c5 safely check points 2015-03-09 11:57:33 -07:00
Justin R. Miller
56bc3052ac refactor vars 2015-03-09 11:57:33 -07:00
Justin R. Miller
e57703d711 properly iterate geometries 2015-03-09 11:57:33 -07:00
Justin R. Miller
b523d0256b increment feature filter on creation 2015-03-09 11:57:33 -07:00
Justin R. Miller
c170f8887d get rid of unused member 2015-03-09 11:57:33 -07:00
Justin R. Miller
405137700b parse geometry collections from the pbfs; iterate geometries in buckets 2015-03-09 11:57:33 -07:00
Justin R. Miller
685aa01043 pass actual feature pbf when filtering layer features 2015-03-09 11:57:32 -07:00
Justin R. Miller
91dc0ba06f no need for while loop 2015-03-09 11:57:32 -07:00
Justin R. Miller
e379756f62 proper move 2015-03-09 11:57:32 -07:00
Justin R. Miller
4d9c1a0f33 iterate through fresh copy of layer data 2015-03-09 11:57:32 -07:00
Justin R. Miller
787cedb593 fix reference 2015-03-09 11:57:32 -07:00
Justin R. Miller
0a8a0aee90 move to abstract base classes & shared pointers 2015-03-09 11:57:32 -07:00
Justin R. Miller
41c3b82d3e refs #928: bookmarking working build of refactor 2015-03-09 11:57:31 -07:00
Justin R. Miller
831264d530 refs #928: 90% of way to genericizing VectorTile 2015-03-09 11:57:31 -07:00