Commit Graph

1884 Commits

Author SHA1 Message Date
John Firebaugh
3afc8b4a29 [core] Introduce StyleLayer subclasses 2015-10-22 09:34:40 -07:00
John Firebaugh
df89de5cc5 [core] Rationalize style property classes: <type>{Paint,Layout}Properties 2015-10-22 09:21:30 -07:00
Bruno de Oliveira Abinader
ead4ca599a [core] Fix transition to default style when no classes are applied
Some property transitions were being set to their fallback values when
no classes are being used. This issue is particularly perceived when the
default transition duration is not zero (animated transitions).
2015-10-21 14:02:08 -07:00
Bruno de Oliveira Abinader
6824a24acd [core] Removed time param from Painter::render
Animation time can be obtained directly from MapData.
2015-10-21 11:20:45 -07:00
Bruno de Oliveira Abinader
0045eef00a [core] Moved Painter::setup() to Painter ctor 2015-10-21 11:20:39 -07:00
Bruno de Oliveira Abinader
ad3078e73d [core] Remove redundant setDebug() from Painter
This information can be obtained directly from MapData.
2015-10-21 11:20:20 -07:00
Bruno de Oliveira Abinader
5db4670d78 [core] Added more transform state getters
Some platforms requires specific information that was previously not
available in public API, but stored internally in TransformState object.
2015-10-21 11:06:51 -07:00
Jason Wray
e5aab73b60 [core] only check for mapbox:// at the start of the failed request's URL 2015-10-21 11:38:01 -04:00
Jason Wray
ae5a345cc4 [core] Improve error message when style is not found or is incompatible
Attempting to use a Mapbox-hosted incompatible raster map/style with GL
would throw a simple 404, without any indication of the real issue.

Fix #1724, ref #1841
2015-10-21 11:38:01 -04:00
John Firebaugh
00a1c2343a [core] Remove shape layers from the style (fixes #2405) 2015-10-20 13:54:20 -07:00
John Firebaugh
c5b95032a5 [core] Annotation refactor 2015-10-20 13:54:19 -07:00
John Firebaugh
597b2b4851 [core] Pull annotation typedefs to own header; add AnnotationID 2015-10-20 13:54:19 -07:00
John Firebaugh
8baa804a44 [core] Fix swapped lat/lon in geo.cpp 2015-10-20 13:54:19 -07:00
Bruno de Oliveira Abinader
6a1b9b31a6 [core] MapContext setStyle{URL,JSON} should ignore redundant calls
Our engine should be robust enough to ignore redundant calls and avoid
triggering a whole style update if the style URL and/or JSON are the
same.
2015-10-16 13:16:02 +11:00
Leith Bade
2ee7b02189 [core] [android] Fix InfoWindow topOffsetPixels adjustment when switching styles
Fixes #2599
Make getTopOffsetPixelsForAnnotationSymbol private
Also implements MapChangeWillStartLoadingMap, MapChangeDidFinishLoadingMap
Paritally implements #630
2015-10-16 13:06:49 +11:00
Bruno de Oliveira Abinader
074d61a55e [core] MapContext setStyle{URL,JSON} should ignore redundant calls
Our engine should be robust enough to ignore redundant calls and avoid
triggering a whole style update if the style URL and/or JSON are the
same.
2015-10-14 22:44:00 -07:00
Bruno de Oliveira Abinader
9a97333e85 [core] Set fade/transition duration to 0 if map mode is still 2015-10-14 11:49:18 -07:00
Mike Morris
62595a9b39 [core] bump libuv to 1.7.5 across all platforms
UV_ASYNC_PARAMS and UV_TIMER_PARAMS for libuv <= 0.10 compatibility

use st_mtim.tv_sec in libuv > 0.10.x
2015-10-14 11:36:28 -04:00
Minh Nguyễn
59799947c7 Break lines on com­mon­ly un­spaced punc­tu­a­tion
Par­ti­cu­lar­ly hy­phens and soft hy­phens.

Fixes #2595.
2015-10-13 09:54:36 -07:00
Konstantin Käfer
e3d9fb1715 [core] only show parent XOR child tiles
Since label rendering isn't clipped, having a parent tile, and only a handful of child tiles loaded may result in some labels being rendered twice (from the parent tile, and the up to three child tiles that necessitate the parent tile remaining in the list). This patch makes sure that in one location, it only ever renders one set of labels, by favoring the parent tile until all required child tiles have been loaded.
2015-10-12 14:46:47 +02:00
Leith Bade
154e27968f [core] Protect MapData.pause with a lock
Fixes #2522
2015-10-08 11:36:22 +11:00
Minh Nguyễn
9482649ae5 [core] Look the other way when placing icon at start of line
When an anchor is at the beginning of a line, its segment’s coordinates match its own coordinates, resulting in an angle of 0°. When the segment’s coordinates match the anchor’s coordinates, consider the next segment instead.

Fixes #2474.
2015-10-07 14:57:58 -07:00
Adam Hunter
1179096dd8 VAO and extension tracking code. 2015-10-06 13:54:36 -07:00
Bruno de Oliveira Abinader
402819e1ad Fix for style properties transition updates 2015-10-06 12:25:46 -07:00
Vladimir Agafonkin
453fd4c0b0 fix layer minZoom being ignored if not less than source maxZoom
This condition led to layers with high minzoom like oneway street
arrows (z15) get parsed and placed regardless of minzoom (e.g. z11+),
wasting a lot of worker CPU time.

It became unnecessary after we added reparsing tiles when overscaling,
and even before that it should have probably been <= rather than <.
2015-10-06 14:25:00 +03:00
Leith Bade
b869771992 Correctly handle spurious wake-ups in Map::pause()
Fixes #2522
2015-10-06 14:10:32 +11:00
Justin R. Miller
999b0d2c75 refs #2527, fixes #774: properly unbind VAO 2015-10-05 16:23:13 -07:00
Konstantin Käfer
3d834b5c40 give every bucket its own set of buffers
This allows changing individual buckets without having leftover data
2015-10-02 15:05:19 +02:00
Konstantin Käfer
6a78a4763d [iOS] fix benchmarking app and update to style v8 2015-10-02 14:57:26 +02:00
John Firebaugh
2066295e35 Install RapidJSON from mason 2015-10-01 11:40:47 -07:00
Mike Morris
b46c102eb0 mason variant@1.0 2015-09-30 15:34:40 -07:00
bsudekum
7112d43609 [node] Handle tiles which 404 better 2015-09-29 18:20:22 -07:00
Adam Hunter
fa2d7453a5 Fix up of some naming issues, etc. 2015-09-29 15:07:39 -07:00
Adam Hunter
3f9f259619 Added GL logging utility 2015-09-29 15:07:39 -07:00
John Firebaugh
af392b9434 Rewrite annotation invalidation strategy
First, move style mutation code out of StyleParser and into AnnotationManager,
coalescing it with the mutation code for shape layers.

Second, allow AnnotationManager to keep track of stale tiles entirely
internally. There's no reason to pass sets of TileIDs around.

Third, correct the logic for invalidating the shape source. Since
AnnotationManager does not track shape invalidations on a tile-by-tile basis,
don't try to invalidate the shape source tile-by-tile.

Fixes #1675
Fixes #2322
Fixes #2095
2015-09-28 14:10:23 -07:00
John Firebaugh
24a5834428 Move updateAnnotationTiles[IfNeeded] to AnnotationManager 2015-09-28 14:10:01 -07:00
John Firebaugh
0c4c7ed901 map/annotation.* ⇢ annotation/annotation_manager.* 2015-09-28 14:10:01 -07:00
John Firebaugh
588fed9a9d Move Annotation class to cpp file 2015-09-28 14:10:01 -07:00
John Firebaugh
bc9aaa5e91 Move entire loop body to helper function 2015-09-28 14:10:00 -07:00
John Firebaugh
dd0e6e0257 Inline AnnotationManager::addTileFeature 2015-09-28 14:10:00 -07:00
John Firebaugh
028abaab00 Ensure that LiveTileData can be reparsed
Annotation tiles may become partially parsed just like regular tiles,
for example if a point annotation is added to the map before the style's
sprite has been loaded. In such cases, they need to be reparsed or the
annotation will not be rendered. Previously, the code path for reparsing
would be short-circuited by a dynamic_cast<VectorTileData*> followed by
a null check. This commit removes that case and adds (back) a virtual
reparse method to the TileData interface.
2015-09-28 14:10:00 -07:00
Konstantin Käfer
a84cf62424 [core] include api.mapbox.com in canonicalization
and move the canonicalization to mapbox.cpp since it's not specific to the SQLiteCache
2015-09-28 15:06:41 +02:00
Leith Bade
feae692dba Fix freezing on Android when rotating
Fixes #1941
2015-09-22 16:23:39 +10:00
Henry Dooley
2141d95196 [core] Annotation cleanup
Eliminate dead code and unecessary STL container usage. Refactor large
methods into smaller functional units.
2015-09-16 17:06:13 -07:00
Lucas Wojciechowski
311bf93abe Revert "[node] Enable npm to build mapbox-gl-native package from source"
This reverts commit 4e1ead344b.
2015-09-16 16:27:53 -07:00
Ansis Brammanis
f1edf1043b fix circle clipping bug
91d2e0ee5c
2015-09-16 12:15:43 -07:00
John Firebaugh
d83be11947 Don't leak GlyphAtlas textures (fixes #2338) 2015-09-16 10:04:23 -07:00
Lucas Wojciechowski
4e1ead344b [node] Enable npm to build mapbox-gl-native package from source
- Allow node bindings to be built if git submodules cannot be checked out
 - Made geojsonvt a mason package instead of a git submodule
 - Use globally installed mason if it cannot be checked out via git submodules
2015-09-15 11:17:53 -07:00
Bruno de Oliveira Abinader
a3ea4acb7c [core] convert remaining types to use OpenGL header defined variants 2015-09-15 13:22:07 +02:00
Bruno de Oliveira Abinader
c33a6bddc6 [core] GL types for buckets, textures, buffers 2015-09-15 13:22:04 +02:00