Commit Graph

4458 Commits

Author SHA1 Message Date
Mikko Pulkki
83c06c1f99 Add FreeCameraOptions to the Map class 2020-05-02 17:07:02 +03:00
Mikko Pulkki
57b4b2829e Refactor TransformState to use internal 3d camera 2020-05-02 17:07:02 +03:00
Mikko Pulkki
9d391d7edd Add quaternions to represent orientations 2020-05-02 17:07:02 +03:00
Mikko Pulkki
c2294ad68d Move vector types to a public header 2020-05-02 17:07:02 +03:00
Alexander Shalamov
30b4e57828 [core] Fix rest of 'brace initialization' errors 2020-04-30 14:09:58 +03:00
zmiao
0ed719e0d6 [core] Fix geometry_util compilation error 2020-04-30 14:09:58 +03:00
zmiao
23b6268a04 [core] Distance expression: Refine logic 2020-04-30 02:31:15 +03:00
zmiao
70fbc97e58 [test] Distance expression: Update unit tests 2020-04-30 02:31:15 +03:00
zmiao
0fa485092e Add support for polygon in distance expression 2020-04-30 02:31:15 +03:00
zmiao
4a54da881f [core] Distance expression: Remove code and comments related to unit argument 2020-04-28 23:10:04 +03:00
Mikhail Pozdnyakov
b84449e35f [core][tile mode] Further improve the label prioritization
The most important variable labels a placed right away at
"populate intersections" phase, even if they do not actually
intersect the tile borders.
2020-04-28 20:50:18 +03:00
Mikhail Pozdnyakov
2bf1610e6c [core][tile mode] Fix placement order of the variable labels
Before this change, all variable labels that could potentially
intersect tile borders were placed first, breaking the style
label placement priority order.
2020-04-28 20:50:18 +03:00
Mikhail Pozdnyakov
e44598704d [core] Label intersection prioritization 2020-04-28 20:50:18 +03:00
zmiao
9bbb1b721e [core] Distance expression: remove unit argument (#16434) 2020-04-24 15:12:45 -07:00
Minh Nguyễn
76ddb15dbc [core] Factored out default fonts 2020-04-24 13:46:40 -07:00
Mikhail Pozdnyakov
9ceb619940 [core][tile mode] Make sure only a single tile is used
In tile mode, we're supposed to have only one tile, which is achieved with provided camera options.

However, if camera options are not accurate enough more tile could be used, which could cause:

* various symbol placement problems like, symbol duplications or cut-offs
* memory/cpu overhead

Now, if `mbgl::tileCover()` returns several tiles, only the first one is used (given that tiles are sorted by the distance to the map center)
2020-04-24 16:11:46 +03:00
Mikko Pulkki
9f8c9c61e8 Add vec3 math operations 2020-04-23 10:53:57 +03:00
Bruno de Oliveira Abinader
1798bda981 Fix compilation issues on GCC 9 2020-04-22 21:36:00 +03:00
Mikhail Pozdnyakov
dc7b1dd34f [core] Source::setVolatile enables Resource::StoragePolicy::Volatile for tiles 2020-04-22 19:21:56 +03:00
Mikhail Pozdnyakov
11efffb351 [core] Add TileUpdateParameters and use it 2020-04-22 19:21:56 +03:00
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