Commit Graph

4438 Commits

Author SHA1 Message Date
Mikhail Pozdnyakov
eac6bdff16 [core] Add style::Source::setVolatile()/isVolatile() API 2020-04-22 19:21:56 +03:00
zmiao
3a14e52f4c [core] Distance expression: Fix expression serialization 2020-04-22 15:53:08 +03:00
zmiao
87c4cb5545 [core] Distance expression: Add index range checker, fix geojson type conversion 2020-04-22 15:53:08 +03:00
zmiao
b4b27627d6 [core] Distance expression: Change template class into template function in geometry_util, add range assertion for distance contaniner IndexRange
Change distance units to small letters, update tests accordingly
2020-04-22 15:53:08 +03:00
zmiao
8dac8f1150 [core] Distance expression: add unit tests for distance expression 2020-04-22 15:53:08 +03:00
zmiao
e52f23795d [core] Introduce distance expression
Add distance unit choices

Fix cmake and add license

Add support for LineString Features

Add template to geometry helper function

Only support line and point

Rename geometry_within.cpp hpp file to geometry_util.cpp .hpp

Remove incorrect indexFilter, fix pointSetsDistance

Fix distance expression
2020-04-22 15:53:08 +03:00
Mikhail Pozdnyakov
ac6c5d9ce0 [core] Tile pyramid passes minimum update interval to tiles 2020-04-20 21:54:31 +03:00
Mikhail Pozdnyakov
183a634b62 [core] TilePyramid::update accepts source impl 2020-04-20 21:54:31 +03:00
Mikhail Pozdnyakov
9a698fe3b1 [core] Introduce Source::setMinimumTileUpdateInterval API
The `Source::setMinimumTileUpdateInterval()` method sets the minimum tile update interval, which is used to throttle the tile update network requests.

Default value is `Duration::zero()`.
2020-04-20 21:54:31 +03:00
Mikhail Pozdnyakov
3c6ccfbb5d [core] Introduce Tile::setMinimumUpdateInterval() 2020-04-20 21:54:31 +03:00
Mikhail Pozdnyakov
64cbc9911d [core] Introduce Resource::minimumUpdateInterval
Introduce `Resource::minimumUpdateInterval` and consider it in the online file source.

The `minimumUpdateInterval` is used to throttle the requests, which were initiated due to resource expiration.
2020-04-20 21:54:31 +03:00
Thiago Marcos P. Santos
ee1d700a9b [core] Add platform abstractions for utils::now()
Some platforms might require special permissions or custom APIs
to access the current time of the day.
2020-04-20 19:03:46 +03:00
Bruno de Oliveira Abinader
f856396131 [core] Fix -Werror={pessimizing,redundant}-move from GCC 9 2020-04-20 14:37:24 +03:00
Gali Nelle
ad543e4355 Add a name to CustomLayer LayerTypeInfo
This to prevent confusion and enable proper error logging when
registering layers with missing name in LayerTypeInfo where the
name should instead be present.
2020-04-20 14:22:08 +03:00
Gali Nelle
9d23917de1 Add missing cast for unsigned long to int conversion 2020-04-20 10:22:29 +03:00
Thiago Marcos P. Santos
8fb3ea0b53 [core] Fix clang-analyzer-optin.cplusplus.VirtualCall
Detected by clang-tidy-8.
2020-04-17 23:48:21 +03:00
Thiago Marcos P. Santos
f82e375bc7 [core] Fix android-cloexec-fopen warning
Detected by clang-tidy-8.
2020-04-17 23:48:21 +03:00
Gali Nelle
fea8a83e7f Introduce a mean to add render features in layers with no sources
This change also uses the support in the LocationIndicator layer, to
return a point feature when queried in correspondence of the location
indicator.
2020-04-17 22:26:32 +03:00
Gali Nelle
cbb3a56c2a Use unique_ptr for RenderLocationIndicatorImpl 2020-04-17 16:52:56 +03:00
Luke Seelenbinder
efe604c392 Better structure fix. 2020-04-17 16:50:11 +03:00
Luke Seelenbinder
40cfb77b7d Fix segfault resulting from an invalid geometry. 2020-04-17 16:50:11 +03:00
Thiago Marcos P. Santos
ea2477f2ea [core] Fix performance-no-automatic-move (bonus)
As reported by clang-tidy-10. We don't run clang-tidy-10 yet. We
should probably consider moving the bots at some point so errors
like this won't return.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
cc8b0e1746 [core] Fix performance-noexcept-move-constructor in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
b49517b737 [core] Fix performance-unnecessary-value-param errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
542c11ae63 [core] Fix modernize-use-equals-default errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
7751e4be76 [core] Fix google-default-arguments errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
c92be2965c [core] Fix misc-unconventional-assign-operator errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
ed99a7781a [core] Fix google-build-namespaces errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
63ef5298cd [core] Fix modernize-use-override errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
a1e5bffa90 [core] Fix performance-type-promotion-in-math-fn errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
4cdc067636 [core] Fix modernize-return-braced-init-list errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
46fa691596 [core] Fix performance-unnecessary-value-param errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
563d4b6cac [core] Fix performance-move-const-arg errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
83b43bb38c [core] Fix modernize-pass-by-value errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
ee2eb13a55 [core] Fix bugprone-forward-declaration-namespace errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
aab575263f [core] Fix performance-unnecessary-copy-initialization errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
c4cb026fa4 [core] Fix readability-redundant-member-init errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
dffe00feea [core] Fix readability-avoid-const-params-in-decls errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Alexander Shalamov
ffea0af9bf Add generic setter for 'source' property
- Add setter for 'source' property
- Test generic setters via setProperty method
2020-04-16 13:52:54 -04:00
Gali Nelle
545a09fcb3 Fix LocationIndicator not updating image sizes when image manager content changes 2020-04-16 11:56:02 +03:00
Mikhail Pozdnyakov
364ea4b3b7 [core] RenderCircleLayer fixes 2020-04-14 22:30:40 +03:00
Mikhail Pozdnyakov
3ba2fc6ea2 [core] CircleLayout fixes 2020-04-14 22:30:40 +03:00
Andrew Hay Kurtz
0c95acf103 Enable 'circle-sort-key' layout property 2020-04-14 22:30:40 +03:00
Łukasz Paczos
f79334c124 when removing an image use the correct list ptr for presence verification
This fixes an issues where calling `removeImage` would crash if the image was not present and the original list was not empty.
2020-04-10 16:55:17 +02:00
Gali Nelle
209857f8ac Fix LocationIndicator Layer
This changes image size properties to be scales instead of pixel sizes.
The commit also adds fixes for handling image updates with the same ID,
adds tests for expressions in paint properties, as well as tests for using images
with pixel ratio greater than 1.
Finally it moves image-tilt-displacement and perspective-compensation properties
from layout to paint properties, and includes other minor cleanups.
2020-04-10 00:15:43 +03:00
Mikhail Pozdnyakov
e6c156420d [core] PlacedSymbolData contains layer id 2020-04-09 17:18:21 +03:00
Mikhail Pozdnyakov
5a9fa44d55 [core][tile mode] Support variable placement + icon-text-fit 2020-04-08 17:00:21 +03:00
Gali Nelle
8e581c88ea Make location indicator bearing a paint property
This change introduces a new property type, Rotation, that uses
a custom interpolator, and that is currently applied to
all style properties named "bearing", with a period attribute.
2020-04-08 14:00:26 +03:00
Gali Nelle
9a55c282fe Add LocationIndicatorLayer
New key is "G" in mbgl-glfw, cycling between no puck, centered
in the viewport and positioned in Tokyo.
2020-04-08 14:00:26 +03:00
Mikhail Pozdnyakov
fd218daa00 [core][tile mode] Fix placement mismatch for the labels with same geomerty 2020-04-08 11:19:37 +03:00