Commit Graph

14 Commits

Author SHA1 Message Date
John Firebaugh
ed5eb9edc1 [test] Add pixelmatch; use in annotation tests 2015-11-25 15:57:37 -08:00
John Firebaugh
0c1e378bc9 [core] Rewrite image handling
* Consolidate Image and StillImage
* Typecheck unassociated vs premultiplied images
* Rewrite default platform image decoding implementation
2015-11-25 15:57:36 -08:00
John Firebaugh
f2772309fe Rewrite CustomSpriteImages test
Previous test was invalid; Map::setSprite is only for annotations.
2015-11-18 16:29:18 -08:00
John Firebaugh
54e08b1f83 [core] Eliminate use of ClassProperties for paint 2015-11-10 11:33:17 -08:00
John Firebaugh
a7219a77aa [core] Don't crash when removing a shape annotation whose layer was never created 2015-10-30 14:36:07 -07:00
John Firebaugh
c46a8254c4 [core] Style-sourced shape annotation properties
This introduces the possibility to source the type and style properties
of a shape annotation from a designated layer in the style.
2015-10-22 15:27:53 -07:00
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
John Firebaugh
00a1c2343a [core] Remove shape layers from the style (fixes #2405) 2015-10-20 13:54:20 -07:00
John Firebaugh
0156ac7c8c Add test for removeAnnotation 2015-09-28 14:14:45 -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
931c56a596 Add some shape annotation tests 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
Thiago Marcos P. Santos
30416c5a98 Add unit tests for addPointAnnotations()
This test would have caught #1874
2015-07-10 21:03:47 +03:00