Commit Graph

1761 Commits

Author SHA1 Message Date
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
64c5b46d9e follow-up fixes after 16416 2020-04-22 19:21:56 +03:00
Mikhail Pozdnyakov
3bebd13d2e [core] Add Resource::StoragePolicy and consider it in resource loader 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
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
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
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
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
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
47b8fc703b [core] Fix readability-container-size-empty errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
6559fa82a7 [core] Fix readability-redundant-smartptr-get errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
e688a847a2 [core] Fix readability-redundant-declaration errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
2cd06fb0e3 [core] Fix readability-const-return-type 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
09d58c0f86 [core] Fix bugprone-forwarding-reference-overload errors in header files
This was a false positive.

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
c21cf413b8 [core] Fix performance-inefficient-vector-operation 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
Andrew Hay Kurtz
0c95acf103 Enable 'circle-sort-key' layout property 2020-04-14 22:30:40 +03: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
Gali Nelle
cd91664935 Add unit tests for Rotation interpolator 2020-04-08 14:00:26 +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
c3b68fe91b [core] PlacedSymbolData includes viewport padding 2020-04-02 11:50:52 +03:00
Mikhail Pozdnyakov
5f4e33b1a3 [core] Introduce API to collect placed symbols data
The following methods are added to the `Renderer` class:
- `collectPlacedSymbolData()`
  enables or disables collecting of the placed symbols data

- `getPlacedSymbolsData()`
  if collecting of the placed symbols data is enabled, returns the
  reference to the `PlacedSymbolData` vector holding the collected data.
2020-04-02 11:50:52 +03:00
Alexander Shalamov
15f73a06f2 [core] Add setMaxOverscaleFactorForParentTiles 2020-04-01 16:18:55 -04:00
Juha Alanen
a67aaca56b [core] Move logging off the main thread 2020-04-01 11:17:43 +03:00
Thiago Marcos P. Santos
94d1c10727 [core] Fix readability-* errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
0998ffbab8 [core] Use const& for the OfflineRegion object
It is used as const and also fixes a build issue on iOS:

```
Non-const lvalue reference to type ‘mbgl::OfflineRegion’ cannot bind
to a temporary of type ‘typename remove_reference<OfflineRegion &>::type’
(aka ‘mbgl::OfflineRegion’)
```
2020-03-25 22:09:07 +02:00
Mikhail Pozdnyakov
7234cb3968 [core] Ability to set source-layer setProperty method 2020-03-24 20:53:55 +02:00
Mikhail Pozdnyakov
20d960ed51 [core] Layer::setProperty() can set min/max zoom and filter 2020-03-24 20:53:55 +02:00
Mikhail Pozdnyakov
280b806777 [core] Move generic setProperty() parts to the base Layer class 2020-03-24 20:53:55 +02:00
Thiago Marcos P. Santos
9dbd0a666a [core] Fix modernize-pass-by-value errors
As reported by clang-tidy-8.
2020-03-23 20:05:40 +02:00
Alexander Shalamov
71efb24e2d Bump mapbox-base to 1.2.0 2020-03-23 11:33:06 -04:00
Thiago Marcos P. Santos
d15b9c1f9c [core] Fix performance-unnecessary-value-param errors
As reported by clang-tidy-8.
2020-03-23 12:09:09 +02:00
Mikhail Pozdnyakov
2ae96ad687 [core] Introduce Renderer::clearData() instead of keepRenderData map options
`Renderer::clearData()` is a better API than the removed `MapOptions::keepRenderData()`:
- gives more flexibility to the client
- similar to the existing `Renderer::reduceMemoryUse()`
- the `MapOptions::keepRenderData()` API implementation could not handle the raise condition, which
happened if the new still image request had come before all tiles from the previous requests were loaded.

Co-authored-by: Dane Springmeyer <dane@mapbox.com>
2020-03-20 11:43:59 +02:00
zmiao
df79b05178 [core] Using TileCoordinates for geometry comparison 2020-03-19 14:40:49 +02:00
Mikhail Pozdnyakov
3536de5124 [core][tile|static mode] Introduce MapOptions::keepRenderData() flag
Render orchestrator stores the render data between render frames if this flag is set.
2020-03-18 20:14:15 +02:00
Thiago Marcos P. Santos
461c414748 [core] Follow-up on the platform integration callback PR
Addressing review comments that arrived after the PR was merged.
2020-03-12 13:35:45 +02:00