Commit Graph

381 Commits

Author SHA1 Message Date
Ivo van Dongen
733661948c [core] BackendScope prevent double (de-)activation
- Guards against duplicate activations by checking wether the backend of the prior scope is the same as the current ones
- Makes sure that only the most outer backend scope deactivates by tracking activation state
2017-07-19 17:34:07 +02:00
John Firebaugh
d618d4a274 [core] Dynamic program compilation for data-driven properties 2017-06-14 11:13:43 -07:00
Bruno de Oliveira Abinader
0d171dbe0e [core] Make TransformState LatLngBounds optional 2017-06-01 13:46:53 -04:00
Konstantin Käfer
b52e171b67 [core] add error for non-virtual destructor deletes + add virtual dtors 2017-05-19 12:12:47 +02:00
Lauren Budorick
1c9af3226f [core] Reuse fill-extrusion textures between frames (#8896) 2017-05-08 09:06:07 -07:00
John Firebaugh
c2b00378b7 [all] Push querySourceFeatures back out to Map
Once Source and RendererSource are split, Source will no longer have access to tiles.
2017-05-02 08:45:09 -07:00
Lauren Budorick
f6e79d7073 [core] Render fill-extrusion layers (#8431) 2017-04-27 15:56:55 -07:00
John Firebaugh
5dd98df50b [all] Rationalize style::Image
A style has a collection of images, just as it has collections of sources and layers.

* Name things appropriately
* Use std::unique_ptr
2017-04-24 15:52:28 -07:00
John Firebaugh
092da9c956 [core] Remove non-Map-dependent projection methods from Map 2017-04-18 14:43:31 +03:00
John Firebaugh
f1c06f8d83 [all] Remove redundant scale-related camera methods
We don't need to have two different measurement systems for map zoom.
2017-04-13 10:28:44 -07:00
John Firebaugh
62576e24a0 [core] Revert use of optional<EdgeInsets>, because EdgeInsets has a natural "empty" state 2017-04-11 14:50:22 -07:00
Bruno de Oliveira Abinader
c4fc89977b [core] Added {set,get}{Min,Max}Pitch 2017-04-11 12:51:09 +03:00
Bruno de Oliveira Abinader
c1c6c1e298 [core] Added Map::{get,set}LatLngBounds 2017-04-11 12:51:09 +03:00
Bruno de Oliveira Abinader
ddc6dcf9cd [core] Move {Map,Transform}::{get,set}{Min,Max}Zoom to bounds pragma 2017-04-11 12:51:09 +03:00
Konstantin Käfer
a84aa453a9 [core] Privatize OpenGL/Context headers 2017-03-28 13:53:19 +02:00
John Firebaugh
34aa7f880e [core] Move map/change.hpp to public include directory 2017-03-28 13:53:19 +02:00
Bruno de Oliveira Abinader
80915992ab [core] Added Map::latLngBoundsForCamera 2017-03-24 13:51:35 +02:00
Konstantin Käfer
234384ece9 [core] Move OpenGL extension initialization to Backend 2017-03-23 14:50:11 -07:00
Konstantin Käfer
8e5214144e [core] Ensure that a BackendScope exists when doing GL calls 2017-03-23 14:50:11 -07:00
Konstantin Käfer
3c91b6b7de [core] cache binary shaders on Android 2017-03-22 15:59:10 +01:00
Bruno de Oliveira Abinader
c1a410be8b [core] s/onSourceDidChange/onSourceChanged/ + source ref 2017-03-21 17:36:56 +02:00
Bruno de Oliveira Abinader
5ff4110243 [core] Pass std::exception_ptr in MapObserver::onDidFailLoadingMap 2017-03-17 11:25:48 +02:00
Bruno de Oliveira Abinader
fc70cbf1e1 [core] Replace MapChange enum with MapObserver 2017-03-15 14:53:32 +02:00
Ivo van Dongen
0d10d2df1c [core] query source features 2017-03-09 13:11:23 -08:00
Ivo van Dongen
548675a196 [core] rename query options for query rendered features 2017-03-09 13:11:23 -08:00
Asheem Mamoowala
60d10dd27d [core] Add support for queryRenderedFeatures filter 2017-03-04 15:42:07 -08:00
Tobrun
34fef22d95 [core] [android] - allow zooming/scaling to use AnimationOptions (#8181)
[glfw] - allow glfw binding to use AnimationOptions instead of using direction directly
2017-02-28 13:22:47 -05:00
Tobrun
a0992f0550 [core] - allow moveBy to use AnimationOptions
[android] - update jni bindings for moveBy with an interpolator
2017-02-20 16:52:18 -08:00
John Firebaugh
7d3c9338c9 [core] Link BackendScopes in a list for additional assertions 2017-02-20 12:04:21 -08:00
John Firebaugh
773f330774 [core] Ensure that context resources are destroyed before context is destroyed 2017-02-20 12:04:21 -08:00
John Firebaugh
694159c49e [core] Nestable BackendScope 2017-02-20 12:04:21 -08:00
Jason Wray
4c311a0091 [core] Expose Map::setZoom with anchor parameter 2017-02-13 18:35:04 -05:00
Minh Nguyễn
a6b1773a44 Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-master
Also reran make style-code and manually discarded anything related to fill extrusion layers.
2016-12-20 12:41:40 -08:00
Ivo van Dongen
18730d598d [core] use raii to guard backend deactivation 2016-12-13 10:03:05 -08:00
Ivo van Dongen
c76a933514 [core] use raii to guard backend deactivation 2016-12-12 09:05:23 -05:00
Roman Blum
1045934d5e [core, ios, macos] Add image accessor to MGLStyle (#7096)
* [core] Add interface to get image from sprite atlas

* [tests] Add tests for Map::getImage

* [ios, macos] WIP: get MGLImage for name from style

* [ios, macos] Fixed -imageForName:

Convert from sprite images to platform images using the existing encodePNG() function, which is also used for printing. Allow -imageForName: to return nil without an assertion failure. Added a basic test.
2016-12-05 17:16:13 -08:00
Minh Nguyễn
3503c0e767 Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.4-master 2016-12-03 15:36:42 -08:00
Minh Nguyễn
850b70ff91 [core, ios, macos] Added layers and sources properties to MGLStyle
Added new layers and sources properties to MGLStyle that contain all the style’s layers and sources, respectively. These properties are KVC-compliant with all the mutable to-many methods. Layers are ordered from topmost to bottommost, for consistency with Cocoa APIs where front/first means top and back/last means bottom.

Also added storage for mbgl::style::Source in MGLSource proper for wrapping AnnotationSource. Until the style finishes loading, its name property is set to nil.

Fixes #6003.
2016-11-28 15:45:37 -08:00
Jesse Bounds
96a7a4402e [core] Return source and layer ownership (#7014)
When a source or layer is removed transfer ownership back to the
caller so it can (optionally) take it. Preserve the behavior that 
removing a CustomLayer triggers deinitialization.  Deinitialize all 
custom layers when a style is destroyed in case those layers are not 
explicitly removed.
2016-11-13 19:56:29 -08:00
Jesse Bounds
edf40bb6d9 [core] Return source and layer ownership (#7014)
When a source or layer is removed transfer ownership back to the
caller so it can (optionally) take it. Preserve the behavior that 
removing a CustomLayer triggers deinitialization.  Deinitialize all 
custom layers when a style is destroyed in case those layers are not 
explicitly removed.
2016-11-11 14:40:04 -08:00
Konstantin Käfer
62b56b799a [core] change std::array<uint16_t, 2> to mbgl::Size 2016-10-27 18:30:58 -07:00
Konstantin Käfer
a4d259c33f [core] move gl::Context to Backend and refactor View 2016-10-25 13:52:36 -07:00
Konstantin Käfer
5cc390d694 [core] separate Backend from View for headless rendering 2016-10-25 13:52:36 -07:00
Mike Morris
817c26111a [core] [node] pass thread pool impl to Map constructor
Updates mbgl::Map constructor usage everywhere

Adds NodeThreadPool implementation using AsyncQueue to call
Nan::AsyncQueueWorker from main thread
2016-10-20 14:37:36 -04:00
Konstantin Käfer
cc78b74098 [core] remove dependence on gl.h types 2016-09-29 10:17:47 -07:00
Konstantin Käfer
63e53de157 [core] standardize on uint16_t for texture sizes 2016-09-27 10:42:10 +02:00
Minh Nguyễn
7ff036cd01 [core] Removed map attribution API
Since client code can readily access the individual sources, Map doesn’t need to expose a dedicated API for iterating over them.
2016-09-26 15:42:57 -07:00
Minh Nguyễn
f307652548 [core] Source-driven attribution
Implemented observer callbacks so the style knows when the source’s attribution changes and the map knows when the style’s attribution changes. Also implemented a getter for a tile source’s attribution.

Fixes #2723.
2016-09-26 11:37:06 -07:00
Thiago Marcos P. Santos
486bdddb23 [core] Add interface to add sprites to the style
Unlike annotations, they will go away when we change the style.
2016-09-22 17:43:28 +03:00
Bruno de Oliveira Abinader
beb67fb7b2 [core] Separate transition options accessors from class API
Now the style class transition options have its own getter/setter, which
persists for each style until a new style is set.
2016-09-13 12:38:59 +03:00