Bruno de Oliveira Abinader
5a63ce5576
[core] Avoid loading source if a source request is currently ongoing
2015-12-17 16:53:37 -08:00
John Firebaugh
110f1ec796
[ios, android] Add methods to remove a custom layer
2015-12-17 15:15:55 -08:00
Minh Nguyễn
986e0ae39e
[core] Added special case for atomic flyTo()
...
startTransition isn’t well-suited to atomic transitions, which are expected to be synchronous and end up at the final state.
2015-12-17 10:24:58 -08:00
John Firebaugh
8a17d30c50
[android] Custom layer bindings
2015-12-16 11:03:32 -08:00
Minh Nguyễn
e304033552
[core] Fixed annotation icon replacement
...
Another pass at #3146 , including a unit test.
2015-12-15 21:04:15 -08:00
Thiago Marcos P. Santos
0f37b670ba
[core] Do not use std:: namespace for log2()
...
As some versions of libstdc++ don't have it.
2015-12-15 18:23:45 -08:00
Romain Quidet
af45d87e54
2210: Sprites can be removed / updated correctly
2015-12-15 16:36:17 -08:00
Minh Nguyễn
e1854f0f26
[core] Corrected flying trajectory; pitched flight
...
Corrected some fairly opaque code that was incorrectly ported from GL JS the first time around in #3171 , causing the trajectory to extend far into the Earth’s orbit. Also transition pitch while flying, call transition frame/finish callback functions, and recognize the same “speed” and “curve” parameters that GL JS does.
Fixes #3296 , fixes #3297 .
2015-12-15 12:52:13 -08:00
Konstantin Käfer
4fc8226838
[core] allow changing the orientation
...
You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
2015-12-15 11:41:58 -08:00
Konstantin Käfer
95cef66e22
[core] change RapidJSON usage to use CrtAllocator and bump GeoJSON VT
2015-12-14 16:43:35 -08:00
Thiago Marcos P. Santos
9af7594d61
[core] Use global namespace on some <cmath> functions
...
Improves compatibility as some old std libs don't have them
on the std:: namespace.
2015-12-11 17:12:31 -08:00
Konstantin Käfer
8d711e9c80
[test] update test suite to include more comprehensive GeoJSON tests
2015-12-11 16:23:43 -08:00
Konstantin Käfer
0f9922cff5
[core] create GeoJSON tiles from inline GeoJSON in sources
2015-12-11 16:23:42 -08:00
Konstantin Käfer
2f973d0a7e
[core] parse GeoJSON source type
2015-12-11 16:23:42 -08:00
Konstantin Käfer
2b9f20461a
[core] move SourceInfo to its own file
2015-12-11 15:25:12 -08:00
John Firebaugh
65b3220368
[core] Reduce custom layer API to lowest common denominator
2015-12-11 12:44:54 -08:00
Adam Hunter
095a8be300
Implementation of flyTo.
2015-12-09 17:14:22 -08:00
John Firebaugh
bde07c8f0e
[core] Custom layers
2015-12-09 13:51:28 -08:00
John Firebaugh
e04c5f6506
[core] Replace StyleLayerType with RTTI
2015-12-07 18:22:33 -08:00
John Firebaugh
203b443d26
[core] Avoid making a new copy of layers for redoPlacement
2015-12-07 11:19:08 -08:00
Konstantin Käfer
478472e501
[core] add std::move to constructors
2015-12-03 15:38:36 +01:00
Konstantin Käfer
d5fb535058
[core] add namespace comment to closing brace
2015-12-03 15:38:36 +01:00
Konstantin Käfer
dc620f48de
[core] Fix std::move() misuse that disables copy elision
2015-12-03 15:38:36 +01:00
John Firebaugh
8afa14fa78
[core] Map::setSprite ⇢ Map::addAnnotationIcon
...
Fixes #3084
2015-12-01 15:10:28 -08:00
John Firebaugh
b7674040ab
[core] Privatize layers and sources
2015-12-01 11:16:57 -08:00
John Firebaugh
bafbf6c04b
[core] Don't share util::ptr<StyleLayer> across threads
2015-12-01 11:16:57 -08:00
John Firebaugh
96f5ae7cb8
[core] Don't share Style& across threads
2015-12-01 11:16:57 -08:00
Adam Hunter
e1091db45e
[core] Use a separate atlas and store for annotation sprites
...
Fixes #1488
2015-12-01 09:15:05 -08:00
John Firebaugh
58886842bc
[core] Move MapData storage to MapContext
...
This allows MapData members to hold GL resources which must be released
on the MapContext thread -- necessary for the following commit.
2015-12-01 09:15:05 -08:00
John Firebaugh
40ebf5d0d0
[core] Introduce StyleUpdateParameters
2015-12-01 09:07:03 -08:00
John Firebaugh
f27c28b6c4
Partially revert "[core] Source should receive a ref to MapData just once"
...
This partially reverts commit d55aa7929c .
2015-12-01 09:07:03 -08:00
Thiago Marcos P. Santos
1d62332204
[core] Use AsyncTask on the MapContext
2015-12-01 00:00:09 +02:00
Bruno de Oliveira Abinader
92856f394c
[core] Collision debug is now MapDebugOptions::Collision
2015-11-27 17:47:02 +02:00
Bruno de Oliveira Abinader
d55aa7929c
[core] Source should receive a ref to MapData just once
2015-11-27 17:47:02 +02:00
Bruno de Oliveira Abinader
1f0820c8e8
[core] Added MapDebugOptions
...
Map debug options are now cycled up to all debug options enabled, then
back to none.
2015-11-27 17:47:02 +02:00
Bruno de Oliveira Abinader
591e0dde2f
[core] Added modified, expires information to TileData
2015-11-27 17:47:02 +02:00
John Firebaugh
1d33790dc0
[core] Fix image type of Map::renderStill
...
It's a premultiplied image. This implies that we were misusing encodePNG
in most cases, as we were passing premultiplied pixels which were then
interpreted as unmultiplied. I changed encodePNG to accept premultipled
pixels, and unpremultiply in the implementations.
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
Minh Nguyễn
2de0a351a0
[core] [iOS] Completion handlers for animated methods
...
Added transition frame and finish functions to CameraOptions. Added Objective-C equivalents to the three main entry points to easeTo() in MGLMapView.
Fixes #1581 .
2015-11-25 15:20:25 -08:00
John Firebaugh
afa04de152
[core] Followup fix to #3037
...
The previous fix resulted in annotations sometimes never being added.
This would happen if, during the execution of MapContext::update where
Update::Annotations was set, the style itself was loaded but some of
its subresources (sprite or sources) were not.
#3082 is a follow up issue to make MapContext::update less error-prone.
2015-11-19 18:01:42 -08:00
John Firebaugh
db1c4f2cc2
[core] Avoid calling AnnotationManager::updateStyle until the style is loaded
...
Fixes #3037
2015-11-18 16:05:13 -08:00
Bruno de Oliveira Abinader
adfac6f061
[core] Added ConstrainMode::{HeightOnly,WidthAndHeight}
...
ConstrainMode gives flexibility to our engine to choose between
constraining both vertically and horizontally, or just vertically
(default behavior).
Constrain in both axis means we can no longer pan the map beyond the map
boundaries. This fixes an issue where e.g. annotations disappear upon
crossing the map boundaries.
2015-11-18 09:37:27 +02:00
Bruno de Oliveira Abinader
711d41f91b
[core] Avoid extra copy of TransformState in Painter::render
...
In MapContext thread, TransformState gets updated from main thread to
MapContext and Painter can safely reference MapContext's TransformState
instead of copying it upon each Painter::render call.
2015-11-18 09:37:27 +02:00
John Firebaugh
7137239cbd
[core] Use std::unique_ptr for FileSource request
2015-11-16 12:25:47 -08:00
John Firebaugh
1caf89c32b
[core] Pass a value to response callback, not a reference
2015-11-16 12:25:47 -08:00
Thiago Marcos P. Santos
36581f3d30
[core] Do not pass uv_loop_t around
...
This should be abstracted by util::RunLoop
2015-11-16 12:25:47 -08:00
John Firebaugh
f9ebe54a63
[core] Merge Sprite into SpriteStore
2015-11-12 13:03:14 -08:00
John Firebaugh
1e350b7ea4
[core] Reorganize sprite related files
2015-11-12 13:03:14 -08:00
Bruno de Oliveira Abinader
fc2fa73363
[core] Cleanup Transform::rotateBy
...
Make use of PrecisionPoint's operator functionalities inherited from
vec2<> and reduced overhead eg. offset_y is always 0 so no need to add
this to calculation inside the if.
2015-11-12 10:46:50 -08:00
Bruno de Oliveira Abinader
8b76f00d8c
[core] PrecisionPoint is now a vec2<double>
...
We could reuse all the operators defined in vec2<>, including operator
bool() that checks if the contained values are !NaN.
2015-11-12 10:46:50 -08:00