Commit Graph

83 Commits

Author SHA1 Message Date
Mikhail Pozdnyakov
f1a28377b5 [core] Add Map.NoHangOnMissingImage unit test 2019-10-28 13:02:32 +02:00
Mikhail Pozdnyakov
d446b3382b [core] Enable move semantics for StyleProperty 2019-09-27 19:17:25 +03:00
Ander Conselvan de Oliveira
bb9b1ab624 [core] Return enum layer property values as string
The output of Layer::getProperty is a mapbox::base::Value which is
equivalent to JSON. When setting the value of an enum property via JSON
its value would be a string, so it would be natural to return a string
too.

Also, the numbers generated depend on the enum definition. They are not
part of the style spec.
2019-09-27 17:09:45 +03:00
Mikhail Pozdnyakov
5304bbc438 [core] Layer::getProperty supports layout properties 2019-09-27 13:08:53 +03:00
Mikhail Pozdnyakov
34ab7be225 [core] Layer::getPaintProperty() -> Layer::getProperty() 2019-09-26 15:54:03 +03:00
Mikhail Pozdnyakov
e78c31c4b5 [core] LayerProperty -> StyleProperty 2019-09-26 11:57:39 +03:00
Mikhail Pozdnyakov
b5862c2127 [core] Add Map.UniversalStyleGetter test 2019-09-26 11:57:39 +03:00
Mikhail Pozdnyakov
6899337f86 [core] Add Map.Issue15342 unit test
The newly added test checks the fix for constant repaint,
caused by `RenderSource::hasFadingTiles()` returning `true` all the time.
2019-09-12 00:40:08 +03:00
Mikhail Pozdnyakov
8af78ddbb9 [core] Update MapObserver::onDidFinishRenderingFrame() API 2019-09-12 00:40:08 +03:00
Mikhail Pozdnyakov
be5aa1806b [core] Added unit test for issue 15216 2019-07-26 11:23:13 +03:00
Konstantin Käfer
7f9274035b [core] refactor program object creation 2019-05-28 16:11:05 +02:00
Aleksandar Stojiljkovic
3cd8c6c1fd [core] Refactor HeadlessFrontend/Backend: GL separation and factory (#14692)
Refactor out HeadlessFrontend and HeadlessBackend gl independent code to gfx.
Define gl::HeadlessBackend as subclass, instantiated by gfx::HeadlessBackend static factory method.
GL dependent tests are still using gl::HeadlessBackend directly (not through gfx).
2019-05-21 07:37:49 +03:00
Thiago Marcos P. Santos
06f1dc48a2 [core] Make the BackgroundScheduler a singleton
- Do not carry it over everywhere as parameter, it is a shared
  instance anyway and the lifecycle is pretty much the app lifecycle
  from the moment we instantiate a map.
- Rename to BackgroundScheduler because it is a Scheduler that will
  do tasks in the background, we don't make assumptions if it is a
  thread pool or a single thread.
- Most importantly, remove the dependency from `core` on `platform`.
2019-05-10 14:20:38 +03:00
Konstantin Käfer
3ceabcd3ec [core] clang-tidy fixes 2019-04-05 11:49:17 +02:00
Konstantin Käfer
66c020034e [core] refactor RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
a782a6d15b [core] move BackendScope to gfx namespace 2019-04-05 11:49:17 +02:00
Sudarsana Babu Nagineni
7af00a404f [core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
2019-03-28 16:41:15 +02:00
Sudarsana Babu Nagineni
f5064e7108 [test] Add unit tests for MapOptions 2019-03-28 16:41:15 +02:00
Sudarsana Babu Nagineni
1cc1d4ea08 [core] Add setter/getter for size property in MapOptions 2019-03-28 16:41:15 +02:00
Łukasz Paczos
419bfbe0eb [core] harden fetching camera for bounds when padding is excessive 2019-03-25 17:53:55 +01:00
Bruno de Oliveira Abinader
d5868d3da8 [core] Remove file source from public Map ctor 2019-03-20 21:30:08 +02:00
Ander Conselvan de Oliveira
5733440747 [core] Group Map LatLngBounds, min and max zoom methods
Group bounds, minimum and maximum zoom related methods together using
the new BoundOptions.

v2: Document that getBounds() initializes all optional fields.
  - Add test for getBounds() on a map with default values.
2019-03-14 18:33:11 +02:00
Bruno de Oliveira Abinader
8cc100bfd5 [core] Get FileSource via UpdateParameters in Renderer::Impl 2019-03-13 17:56:44 +02:00
Sudarsana Babu Nagineni
5e2b6bf636 [core] Add MapOptions to define properties of Map
To simplify the Map constructor, introduce MapOptions
interface to define the properties that can be set on
a Map.
2019-03-08 18:20:55 +02:00
Sudarsana Babu Nagineni
744d92e763 [core] consolidate Axonometric rendering API
Instead of having individual APIs for setting axonometric
and skew options, create ProjectionMode struct that holds
all the relevant options for Axonometric rendering and
introduce setter/getter on the Map for those options.
2019-03-08 17:36:40 +02:00
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
f5f10ec119 [core] Remove map zoom setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
db2e1b2e5f [core] Add RendererState::{pixelForLatLng,latLngForPixel} 2018-11-14 12:22:22 +02:00
Bruno de Oliveira Abinader
55710cbb67 [core] Added RendererState::has{Image,Layer,Source} 2018-10-25 16:23:40 +03:00
Konstantin Käfer
8bf66ef7a7 [core] remove some uses of <iostream> and <sstream> 2018-10-23 12:23:40 +02:00
Bruno de Oliveira Abinader
ea51b11dcc [core] Introduce mbgl::RendererState 2018-10-19 12:05:16 +02: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
Bruno de Oliveira Abinader
83bd4c2135 [core] Replace remaining dynamic_cast with static_cast 2018-08-08 14:14:34 +03:00
John Firebaugh
2bbc792060 [core] Check all bucket dynamic_casts
A mismatch can occur when a layer changes from one type to another.
2018-07-24 11:08:40 -07:00
Bobby Sudekum
4286d5869c Add pitch argument to cameraThatFits functions (#12213) 2018-07-02 16:30:18 -07:00
Bruno de Oliveira Abinader
48744d51d8 [test] Update Map.PrefetchTiles 2018-02-28 11:54:37 +02:00
Konstantin Käfer
5de373fff0 [core] continue loading style even if we mutate it
When we load a stale style from cache, and the user immediately starts mutating it, we should continue loading the style so that we'll get a fresh copy of the data into our cache and avoid perpetually showing the stale style.
2018-02-23 11:29:15 +01: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
Asheem Mamoowala
2366487275 [core] Add cameraForLatLngs() method with modified bearing 2017-10-09 11:42:37 -07:00
Konstantin Käfer
ca4f0bbcc5 [test] add test for rendering a 204 No Content tile 2017-09-22 19:24:42 +02:00
Bruno de Oliveira Abinader
bd4441503f [test] Added Map.SetStyleDefaultCamera test 2017-08-11 22:04:52 +03:00
John Firebaugh
32bd1d54fa [node, tests] Consolidate headless rendering logic in HeadlessFrontend 2017-07-26 09:50:38 -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
46c43510d7 [core] rename backend to renderer backend 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
57351c068b [core] split backend from mapobserver 2017-07-18 10:45:12 +02:00
Ivo van Dongen
24a00231f3 [core] fix render doesn’t flag style mutation 2017-06-26 16:19:06 -07: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