Commit Graph

2043 Commits

Author SHA1 Message Date
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
bc033ad8d4 [core] util::wrap(): std::fmod is not lossless 2019-03-06 18:09:14 +02:00
Bruno de Oliveira Abinader
74538406e9 [core] Organize Map::{move,pitch,scale,rotate}By 2019-03-04 14:45:32 +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
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
491fce6879 [core] Added Map::pitchBy() 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
02f2b9c75c [core] Added Map::scaleBy() 2019-03-04 14:45:32 +02:00
Mikhail Pozdnyakov
ceec74f52f [core] peer must not wrap itself 2019-02-28 17:45:21 +02:00
Mikhail Pozdnyakov
810999fadf [core] Simplify util::peer
Remove custom vtable, base implementation on `std::unique_ptr`.
2019-02-28 17:45:21 +02:00
Bruno de Oliveira Abinader
dd651691f3 [core] Move Map::Impl to its own def/impl files 2019-02-27 16:29:06 +02:00
Bruno de Oliveira Abinader
e5ed9d9ddf [core] Use unwrapped longitude for bounds check 2019-02-26 21:17:31 +02:00
Mikhail Pozdnyakov
e800f37547 [core] Layer manager is responsible for buckets and layouts creation
This is a step to stop using of render layers in tile worker thread.
2019-02-25 13:47:56 +02:00
Thiago Marcos P. Santos
056073a904 [build] Use the correct define on Windows
https://blog.kowalczyk.info/article/j/guide-to-predefined-macros-in-c-compilers-gcc-clang-msvc-etc..html
2019-02-19 16:20:56 +02:00
Thiago Marcos P. Santos
9b66be7bef [core] Abstract the OpenGL implementation
The platform will be responsible to load the OpenGL implementation
and give the function pointers to Mapbox GL Core. The platform might
load OpenGL by linking against some OpenGL implementation, load it
dynamically, etc. It doesn't matter as long as it is a valid
implementation.

Also adds the `::platform` namespace where all the missing symbols and
interfaces expected to be implemented by the platforms will live.
2019-02-12 19:42:08 +02:00
Mikhail Pozdnyakov
577e6ee98a [core] Simplify mbgl::Immutable 2019-01-15 22:29:08 +02:00
Mikhail Pozdnyakov
c621b8100d [core] Drop LayerType
Drop LayerType and its remaining usages.
The generic code should be layer type agnostic.
2019-01-04 11:51:33 +02:00
Chris Loer
b7e2b11a75 [core] Support for excluding ideographic glyphs from offline downloads. 2018-12-21 15:13:48 -08:00
Alexander Shalamov
a1ca06e304 [core] Introduce Renderer::queryFeatureExtension API
New interface allows it's users to query additional information about
feature that was provided by qRF interface. This is particularly
useful for clustered features.
2018-12-12 15:08:18 +02:00
Chris Loer
662a495561 [docs] EnterIdle -> BecomeIdle 2018-12-11 11:46:16 -08:00
Chris Loer
70c2d5a4ca [core, darwin, android] Add onDidEnterIdle to MapObserver.
didEnterIdle fires whenever render completes and no repaint is scheduled.
2018-12-11 11:46:16 -08:00
Mikhail Pozdnyakov
ebd87a5442 [core, android, darwin] Move layer factories to separate files 2018-12-10 18:20:32 +02:00
Konstantin Käfer
64559a255b [core] convert CompoundExpressionRegistry to constexpr hash map 2018-12-04 16:20:51 +02:00
Konstantin Käfer
2b9f3aad9a [core] use constexpr map using eternal for expression lookups 2018-12-04 16:20:51 +02:00
Chris Loer
f87ef3f72a [core] OverscaledTileID::isChildOf should check wrap values.
Fixes issue #13478
2018-11-30 12:30:50 -08:00
Mikhail Pozdnyakov
92352de87d [core] layermanager folder
Move `LayerManager` and `LayerFactory` abstract classes to a dedicated folder.
2018-11-30 19:09:17 +02:00
Bruno de Oliveira Abinader
e64c28613a [core] Support fill-extrusion-vertical-gradient 2018-11-29 14:23:55 +02:00
Mikhail Pozdnyakov
ad03e42b28 [core] LayerManager can disable annotations
At the moment, the annotations implementation in the `mapbox-gl-native`
core is creating concrete layer instances apart from `LayerManager/LayerFactory`
code path.

So, annotations must be disabled if the `LayerManager` implementation does
not provide line, fill or symbol layers (those, used by the annotations).

Note: in future, annotations implementation will be moved from the core to the
platform SDK level(see https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation)
and `LayerManager` won't need to disable it.
2018-11-28 17:18:38 +02:00
Bruno de Oliveira Abinader
20ca1a0418 [core] Cleanup Transform, use {jump,ease}To() instead 2018-11-27 21:38:36 +02:00
Bruno de Oliveira Abinader
e8f7866e9e [core] Remove error-prone setlatLng overload 2018-11-27 21:38:36 +02:00
Mikhail Pozdnyakov
361982fef8 [core][Android][Darwin] LayerManager creates RenderLayer instances
`LayerManager` is now responsible for `RenderLayer` instances creation,
so that there is a single entry point for creating of objects, which
correspond to a certain layer type.

The `LayerType type` field is dropped from `Layer::Impl`.
2018-11-27 18:10:21 +02:00
Bruno de Oliveira Abinader
52cce7925d [core] Camera center and anchor points are mutually exclusive 2018-11-26 17:15:51 +02:00
Bruno de Oliveira Abinader
594d2074a3 [core] Let placement transitions use the transition duration, if set, and allow disabling them entirely 2018-11-21 16:43:20 +02:00
Alexander Shalamov
527851e2aa [core] Add static layer properties to mbgl::style::LayerTypeInfo 2018-11-19 14:06:21 +02:00
Huyen Chau Nguyen
9a606caf0b [core] define number of concurrent downloads in online file source variable 2018-11-15 12:19:48 -08:00
Mikhail Pozdnyakov
33818233cf [core][android] Introduce mbgl::style::LayerTypeInfo
The `LayerTypeInfo` contains static meta data about certain layer type.

Each layer module should have a single immutable `LayerTypeInfo` instance
for the represented layer type. Both `LayerImpl` and `LayerFactory` from the
module always refer to the same `LayerTypeInfo` instance, so address of this
instance can be used as a layer module Id during the process life time.
2018-11-15 18:32:31 +02:00
Bruno de Oliveira Abinader
db2e1b2e5f [core] Add RendererState::{pixelForLatLng,latLngForPixel} 2018-11-14 12:22:22 +02:00
Bruno de Oliveira Abinader
bf8b24fa8d [build] Update to geometry v1.0.0 2018-11-13 17:28:26 +02:00
Mikhail Pozdnyakov
5a70f2b150 noexcept specifier for layer factory methods 2018-11-07 16:34:20 +02:00
Mikhail Pozdnyakov
ffdeef3a26 Refer corresponding LayerFactory instance from the Layer::Impl 2018-11-07 16:34:20 +02:00
Thiago Marcos P. Santos
7ff85374a7 [build] Remove #pragma diagnostic for boost
Boost is now included as a system header and the compiler
should ignore it when issuing warnings.
2018-11-01 16:29:37 +02:00
Mikhail Pozdnyakov
cfcb53128b Introduce the style::Layer factory classes
This patch introduces the initial implementation of
- A `LayerFactory` abstract class that creates `style::Layer` instances of
  a certain layer type (line, hillshade, round, ..)
- A singleton `LayerManager` class, which is responsible for initializing
  the `LayerFactory` instances and forwarding the `create()` calls to the
  corresponding factory.
2018-10-31 18:05:01 +02:00
Mikhail Pozdnyakov
56808731b6 Remove style::Layer::is()/as() 2018-10-31 11:22:46 +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
55710cbb67 [core] Added RendererState::has{Image,Layer,Source} 2018-10-25 16:23:40 +03:00
Ryan Hamley
3ec0231bb7 [core] Avoid wrapping longitude values of exactly 180 and 360 (#12797) (#13006) 2018-10-24 18:38:54 -07:00
Huyen Chau Nguyen
fa78bcadfd [core] add tests for handling requests with different priorities
- ensure that low priority requests are handled last
- add option to set the number of maximum concurrent requests for tests
- some style fixups
2018-10-23 12:47:10 +02:00