Commit Graph

2155 Commits

Author SHA1 Message Date
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
d90b2bb6dc [core] Introduce Light::getProperty() 2019-09-27 13:08:53 +03:00
Mikhail Pozdnyakov
f3146e43cd [core] ValueFactory for expression::formatted, other improvements 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
1733e29f0a [core] Separate header for StyleProperty 2019-09-26 15:54:03 +03:00
Mikhail Pozdnyakov
e78c31c4b5 [core] LayerProperty -> StyleProperty 2019-09-26 11:57:39 +03:00
Mikhail Pozdnyakov
c2dc873cf9 [core] Introduce Layer::getPaintProperty() generic getter 2019-09-26 11:57:39 +03:00
Mikhail Pozdnyakov
2b834001cc [core] type aliases and conversion traits for mapbox::base::Value 2019-09-26 11:57:39 +03:00
Alexander Shalamov
e5cdc4ecf3 [core][android][darwin] Move number format to i18n 2019-09-26 10:55:47 +03:00
Alexander Shalamov
9c8295c6a6 [core][android][darwin] Move platform specific Collator impls from expression
Platform specific Collator implementations should not be part of an expression APIs.
2019-09-26 10:55:47 +03:00
Thiago Marcos P. Santos
c7bbd5bbef [core] Fix performance-move-const-arg 2019-09-25 18:59:07 +03:00
Thiago Marcos P. Santos
cf95bc2bb2 [build] Disable clang-format on generated code
Nice to have, but would make maintain the templates a lot harder.
2019-09-25 18:59:07 +03:00
Thiago Marcos P. Santos
381dda31b4 [build] Fix builds with -pedantic 2019-09-20 12:58:02 +03:00
Mikhail Pozdnyakov
152d4c35fc [core] Add LayerTypeInfo::TileKind 2019-09-18 16:21:59 +03:00
Mikhail Pozdnyakov
224d49cc90 [core] Check layer compatibility with source 2019-09-18 16:21:59 +03:00
Juha Alanen
6b13c42314 [build] Fix clang format and tidy checks 2019-09-18 14:29:15 +03:00
Juha Alanen
48f462bc7b [core] Add removeFeatureState API 2019-09-18 14:29:15 +03:00
Juha Alanen
8e19be9d9c [core] Add support for set/getFeatureState APIs 2019-09-18 14:29:15 +03:00
Juha Alanen
413278ca20 [core] Add feature state support to bucket classes 2019-09-18 14:29:15 +03:00
Juha Alanen
75d18e32fc [core] Add feature state support to expression 2019-09-18 14:29:15 +03:00
Juha Alanen
e51fafd4eb [core] Add new types for feature states 2019-09-18 14:29:15 +03:00
zmiao
0a219d182c [Core] Fix wrong maxzoom setting of tileSet when using URL source (#15581)
* [core] Take max/min zoom option from style if they are set

* [core] std::move input value

* [Core] Add changelogs

* [Core] Fix clang-format reported error

* [Core] fix clang-tidy reported error
2019-09-17 18:00:37 +03:00
Thiago Marcos P. Santos
83a019d021 [build] Fix clang format and tidy checks 2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
a849b38390 [build] Mark explicitly visible symbols
Easier to maintain than a linker script. We build
everything with visibility hidden by default.
2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
d424850257 [build] Make the default styles part of GL Native
The reason is applications using it, like GLFW, don't need
to depend on code inside platform/default.
2019-09-17 12:28:55 +03:00
Mikhail Pozdnyakov
796cc3a4d6 [core] Bitmask operations for enums 2019-09-13 13:45:48 +03:00
Mikhail Pozdnyakov
8af78ddbb9 [core] Update MapObserver::onDidFinishRenderingFrame() API 2019-09-12 00:40:08 +03:00
Bruno de Oliveira Abinader
dfaa859d99 [core] Expose mbgl::style::Light::setProperty
Works the same way as mbgl::style::set{Paint,Layout}Property functions.
2019-09-11 14:29:26 +03:00
Mikhail Pozdnyakov
151ea331f8 [core] Use mapbox::base::TypeWrapper instead of utils::peer 2019-09-10 11:51:17 +03:00
Mikhail Pozdnyakov
5207a36074 [core, ios, macos] SDK objects should hold weak pointers to the core style objects (#15539) 2019-09-09 23:55:38 -04:00
Bruno de Oliveira Abinader
544aabd020 [core] Add requiredTileCount to OfflineRegionStatus 2019-08-29 18:22:59 +03:00
Łukasz Paczos
e5c219d035 [core] make padding optional when camera position is requested.
When padding is not provided, the current one that's cached in the TransformState is going to be returned.
2019-08-29 14:51:24 +02:00
Ander Conselvan de Oliveira
21632a66f8 [core] Remove programCacheDir parameter from ProgramParameters
Binary shader support has been removed in commit c2f974f2a5 ([core]
Remove binary shader support). This left-over parameter is not used
anywhere anymore.
2019-08-27 16:23:48 +03:00
Mikhail Pozdnyakov
ef3d04dee5 [core] Export symbol placement update status from MapObserver 2019-08-23 10:56:05 +03:00
zmiao
0f34eb7b25 Indroduce clusterProperty option for aggregation (#15287)
* indroduce clusterProperty option for aggregation

* remove unnecessary codes

* update geojson_option conversion

* fix reviewing findings
2019-08-16 15:03:48 +03:00
Alexander Shalamov
148d65bced [core][node] Serialize formatted expression's text-color option
This enables proper round-tripping for serialized format expression.
2019-08-15 18:25:10 +03:00
Alexander Shalamov
075d458403 [core] Add style bindings for "text-writing-mode" layout property 2019-08-13 13:32:56 +03:00
Aleksandar Stojiljkovic
73d9f26d03 [core] Limit pitch based on edge insets. Fix max Z calculation in getProjMatrix.
Patch partly fixes #15163 in a way that it doesn't allow loading tens of thousands of tiles and attempt to show area above horizon:

Limit pitch based on edge insets. It is not too bad - current limit of 60 degrees stays active until center of perspective is moved towards the bottom, to 84% of screen height. The plan is to split removal of 60 degrees limit to follow up patch.

Fix max Z calculation in getProjMatrix. TransformState::getProjMatrix calculation of farZ was complex with possibility to lead to negative z values. Replacing it with simpler, precise calculation:
furthestDistance = cameraToCenterDistance / (1 - tanFovAboveCenter * std::tan(getPitch()));

TransformState::getProjMatrix calculation of farZ was an aproximation. Replacing it with simpler, but precise calculation.

Related to: #15163
2019-08-01 09:28:36 +03:00
Heather Stenson
fd99a6e570 [docs] Remove references to increasing offline tile limit 2019-07-18 16:27:31 -07:00
Mikhail Pozdnyakov
fa5646d112 [core] Synchronize render passes and render tiles
Before this change render passes were assigned for the
whole layer at properties evaluation stage.

This caused problems, as layer render data are bound
to the tile and these data might differ from tile to
tile, depending on which tile has been updated by the
tile worker and which has not been yet updated.

This change takes into consideration the actual render
passes required for each tile and combines them for
the layer render passes. Naturally, this change also
introduces render pass check for each render layer in
`RenderLayer::render()` implementations.
2019-07-11 15:36:28 +03:00
Mikhail Pozdnyakov
c144591322 [core] Introduce LayerProperties::constantsMask()
Constants mask for data-driven paint properties is a reliable
criteria of whether the given updated properties can still be used
with the existing bucket (and the gl program instance).
2019-07-02 16:05:09 +03:00
Julian Rex
e611e57271 [core] Minor change to silence documentation warning on iOS. 2019-07-02 11:44:20 +03:00
Juha Alanen
0ca8ea6f16 [core] Add number-format expression 2019-06-27 15:51:22 +03:00
Bruno de Oliveira Abinader
1a9e07e4ed [core] DefaultFileSource dynamic support for cache-only requests 2019-06-25 20:10:21 +03:00
Thiago Marcos P. Santos
68e3cbacbc [core] Add method for setting a maximum size for the ambient cache
- Removed this parameter from the constructor, now that we
  have a method to set it.
- Add the method and enforce the limits if the ambient cache exceeds the
  size.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
78eeffe171 [core] Clear/Invalidate should also work on non-tile resources
These methods were only affecting tiles, but they should really
work on every resource like style, glyphs, etc.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
59e7b9a878 [core] Rename resetCache to resetDatabase
Avoid confusion about what is being reset. In this case, the whole
database and not only the ambient cache.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
5b4bb1398b [core] Surface cache management APIs
These APIs need to be on the DefaultFileSource in order to
be visible for the SDKs bindings.
2019-06-13 22:28:16 +03:00
Konstantin Käfer
844299f1c3 [build] remove roundtrip through <experimental/optional> when using optional 2019-06-12 12:04:07 +02:00