Commit Graph

166 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
586b22c0df [core] Remove map coordinate setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
ba7427b4ac [core] Transform{State}: s/angle/bearing/ 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
73ac3c784f [core] Remove map bearing setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
21a39306da [core] Remove map pitch setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
f5f10ec119 [core] Remove map zoom setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
bf8b24fa8d [build] Update to geometry v1.0.0 2018-11-13 17:28:26 +02:00
Mikhail Pozdnyakov
7a9461a8d4 Consolidate style::Layer properties API
The `style::Layer` class now exposes all the properties contained at `style::LayerImpl`.
This allowed to drop `style::Layer::accept()` method usage, avoid the repeated generated code
and thus save some binary size.

This patch is a part of the layers modularization effort.
2018-10-25 22:42:43 +03:00
Bruno de Oliveira Abinader
98c36fc06e [core] CameraOptions receives and outputs angle and pitch as degrees, not radians 2018-10-19 12:05:16 +02:00
Chris Loer
ce76bde13d [core] Initial implementation of 'format' expression 2018-10-15 13:15:46 -07:00
Chris Loer
d735d89835 [core] Port "collision group" plumbing to gl-native.
[node] Hook up map-wide "crossSourceCollisions" option, defaulting to true.
[test] Pass "crossSourceCollisions" test option through test harness; enable cross-source-collisions tests on native.
2018-09-12 14:10:46 -07:00
Konstantin Käfer
30272924a9 [node] capture invalid input data as ParseError objects
This allows us to distinguish them from other types of errors
2018-08-27 14:07:40 -07:00
Konstantin Käfer
112bbc7ab2 [core] make style/conversion.hpp implementation private 2018-08-19 13:09:16 +02:00
John Firebaugh
b2f60a4bf2 [core] Eliminate setProperty & co. 2018-08-13 12:39:44 -07:00
Konstantin Käfer
f3b5902f05 [node] prevent scheduled renderFinished() calls from running when render is canceled
Reverts d5aff71 (#11948) and implements an alternative solution.

Even with the previous fix applied, we were calling `renderFinished()` directly when the render was canceled. This led to the following scenario (all on the main thread):
- `Map::renderStill()` callback is called, `uv_async_send` schedules a call to `renderFinished()`.
- `NodeMap::cancel()` destroys the map object, and calls `renderFinished()` directly, which cleans up the request
- `NodeMap::startRender()` is called to schedule a _new_ render, which means that a new callback will be set
- The `uv_async_t` fires and calls `renderFinished` again:
   - We don't return early as intended by the fix in #11948 since a new callback/`req` object is now available.
   - Since neither error nor image has been set, we'll see a `Didn't get an image` error message.
   - We call the callback with the error. In scenario where we're reusing Map objects, we will start a new render, which will now trigger the `Map is currently rendering an image` error in `Map::renderStill`, and the map object enters a circle in which it will now fail repeatedly with this error.

This commit fixes the issue by completely removing the existing `uv_async_t` handle that could have a scheduled call, and replacing it with a fresh instance of an `uv_async_t` handle.
2018-07-13 10:28:26 +02:00
Chris Loer
9ff5d34ef2 [core] Introduce "collator" expressions
Cross platform parsing and evaluation code.
2018-07-03 10:03:05 -07:00
Dane Springmeyer
a70727245c Change error message with invalid render usage (#12265)
* Change error message with invalid render usage

This change disambiguates this error condition with a different error with the same error message at 789baf4c1f/src/mbgl/map/map.cpp (L157-L160)

* fix test expectation
2018-06-29 22:17:29 -07:00
Konstantin Käfer
162ee6f4e8 [node] fixup bad merge 2018-05-22 12:19:40 +02:00
Konstantin Käfer
973aa963f9 [node] move to Nan 2.10.0 2018-05-22 11:17:01 +02:00
Konstantin Käfer
d5aff7182d [node] prevent race condition for renderFinished 2018-05-22 11:02:51 +02:00
Anand Thakker
352d63d2ce Don't enforce ["zoom"] constraints for filters (#11672)
* Don't enforce ["zoom"] constraints for filters

Fixes #11594

* Add a couple of comments

* Fix ambiguous constructor call

* ParsingContext(optional<Type>) => ParsingContext(Type)
2018-04-12 16:02:48 -04:00
Łukasz Paczos
22b4ef1f4b Update layer immediately when changing its max/min zoom level (#11399)
* [android][core] update layer immediately when changing it's max/min zoom

* [core] node bindings for layer zoom range
2018-04-12 10:42:14 +02:00
Anand Thakker
c50a74d1c2 Remove unused lambda capture (#11602)
Fixes #11588
2018-04-05 10:57:45 -04:00
Chris Loer
75feda12f1 [core] Implement Expression::serialize()
Issue #10714
- Each expression stores its operator as a string, and default serialization is [operator, serialize(child1), ...]
- Custom implementations of `serialize` for Expression types that don't follow the pattern
- expression::Value -> mbgl::Value converter
- node_expression bindings to expose `serialize`
2018-02-28 16:09:09 -08:00
Chris Loer
8e1fc8ff38 [core, node] Hold on to map handle during NodeMap::request.
Avoids a potential crash if garbage collection happens in the middle of a call to NodeMap::request from a map that's eligible for GC.
Fixes issue #11281
2018-02-23 18:05:13 -08:00
Vladimir Agafonkin
82de856c94 [core, ios, macos, android, node] Heatmap layer (#11046)
Co-Authored-By: Konstantin Käfer <mail@kkaefer.com>
Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com>
Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
2018-02-15 17:38:23 +02:00
Konstantin Käfer
d511f74ce4 [node] add setLight support 2018-01-24 16:35:47 -08:00
Molly Lloyd
f3294200c6 [core] add raster-dem source type and hillshade layer type (#10642) 2018-01-23 10:49:23 -08:00
Ansis Brammanis
22c07596a0 [core] Split MapMode::Still into Static and Tile
`Tile` makes sure the symbols in the resulting tile are tileable while
symbols in `Still` match rendering in `Continuous` mode.
2017-11-17 10:05:15 -08:00
Anand Thakker
f648cfeef6 Implement Expressions (#9439)
Ports https://github.com/mapbox/mapbox-gl-js/pull/4777 (and its several follow-ups)
2017-11-08 12:34:02 -05:00
John Firebaugh
4b2e1cddb4 Replace compile-time polymorphism with runtime polymorphism in the conversion system 2017-10-23 09:56:43 -07:00
Bruno de Oliveira Abinader
8acb78ee79 [node] Reset HeadlessFrontend in NodeMap::release() 2017-10-20 01:27:26 +02:00
Lauren Budorick
e43e2aa3d7 [core, node] Support axonometric rendering 2017-10-14 03:15:34 +02:00
Bruno de Oliveira Abinader
447d24bb19 [node] Added 'removeSource' 2017-09-15 18:28:40 -03:00
Bruno de Oliveira Abinader
e9914bf034 [node] Implement GeoJSON converter 2017-09-13 23:35:27 +03:00
Bruno de Oliveira Abinader
6ee8d7bb60 [node] Set style default camera upon each test suite run 2017-08-31 10:17:21 +03:00
Bruno de Oliveira Abinader
d43757271e [node] Cleanup NodeMap::Render 2017-08-31 10:17:21 +03:00
John Firebaugh
32bd1d54fa [node, tests] Consolidate headless rendering logic in HeadlessFrontend 2017-07-26 09:50:38 -07:00
Ivo van Dongen
d2a437d048 [node] manage backendscope in renderer frontend 2017-07-25 17:44:28 +03:00
John Firebaugh
9d22ac8281 Partially revert "[node] Fix memory test hanging after GlyphAtlas refactoring (#8394)"
This reverts commit 5700c99e55.
2017-07-21 09:31:39 -07:00
Ivo van Dongen
a5a0558bde [test] allow only a single shared display to avoid egl errors 2017-07-18 10:45:12 +02:00
Ivo van Dongen
815ffb253b [android][glfw][ios][macos][node][qt] rename backend to renderer backend 2017-07-18 10:45:12 +02:00
Ivo van Dongen
b97cc980e0 [node] rendering interface changes 2017-07-18 10:45:12 +02:00
Ivo van Dongen
3832f8d0d8 [core] renderer interface 2017-07-18 10:45:12 +02:00
Ivo van Dongen
39a732d7ae [android][glfw][ios][macos][node][qt] split backend from mapobserver 2017-07-18 10:45:12 +02:00
John Firebaugh
40e4755621 [core] Move setStyleJSON/URL to Style; add Map::setStyle 2017-06-22 08:04:39 -07:00
John Firebaugh
1520a56813 [all] Promote Style to public API 2017-06-22 08:04:39 -07:00
Asheem Mamoowala
c0c1028dcf [core] Add toDouble Conversion method for correctly parsing Lat Lng coordinates 2017-06-01 15:38:01 -07:00
John Firebaugh
9e1cbbeacb [node] Pixel ratio may be floating point 2017-05-23 12:59:27 -07:00
John Firebaugh
cc1ea759a6 [core, node, darwin, android, qt] Make image ID part of Image
More like Source and Layer.
2017-05-16 12:26:35 -07:00
John Firebaugh
9eba2a66d1 [core, node, darwin, qt] Remove support for paint classes 2017-05-15 09:45:55 -07:00