Commit Graph

4399 Commits

Author SHA1 Message Date
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
Mikhail Pozdnyakov
88337c23f7 [core][tile mode] Improve placement algorithm for variable labels 2020-04-08 11:19:37 +03:00
Mikhail Pozdnyakov
8165b7dee1 [core][tile mode] Placement algorithm improvements
Now, the intersecting symbols are placed across all layers according to the following rules:
1) First we look, which of the tile border(s) the symbol intersects and prioritize the the symbol accordingly (high priority -> low priority):
vertical & horizontal -> vertical -> horizontal

2) For the symbols that intersect the same tile border(s), assuming the tile border split symbol into several sections, we look at the minimal section length.
The symbol with a larger minimal section length is placed first.

3) Finally, for the symbols that intersect the same tile border(s), and have equal minimal section length, we look at the anchor Y cordinate.
2020-04-08 11:19:37 +03:00
Mikhail Pozdnyakov
e6bac0eb9f [core] Symbol by symbol placement for intersections 2020-04-08 11:19:37 +03:00
Mikhail Pozdnyakov
a32672b9e6 [core] Introduce PlacementContext
Make `placeSymbol()` a method and introduce copiable `PlacementContext`.
2020-04-08 11:19:37 +03:00
zmiao
bf4c7340f3 [build] Fix undefined behavour sanitizer (#16375)
* [build] Fix integer overflow runtime error for core part

Temporarily remove circle ci UBSAN build precondition

* [build] Enable all of the ubsans

[build] Check runtime error

[build] Update UBSAN_OPTION

* [build] Add UBSAN blacklist

[build] Ignore system libraries

[build] Ignore vendor library

* [build] Fix implicit conversion runtime error in core

* [build] Fix division by zero runtime error

* [build] Add unfixed error to ubsan blacklist

* [build] Make UBSAN halt on error

Revert "Temporary remove build precondition"

* [build] Fix division by zero error

* [build] Make UBSAN officially work without FIXME prefix

* [build] Fix implicit conversion from int64_t to uint64_t

* [build] Rename style test json file name

* Address review findings
2020-04-07 16:30:30 +03:00
Mikko Pulkki
d0c103fa8f Refactor tileCover to support lod tiles 2020-04-06 12:10:21 +03:00
Mikhail Pozdnyakov
c3b68fe91b [core] PlacedSymbolData includes viewport padding 2020-04-02 11:50:52 +03:00
Mikhail Pozdnyakov
3412331e4a [core][tile mode] Implement API to collect placed symbols data 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
Aleksandar Stojiljkovic
881d5dab6a Hillshade bucket fix https://github.com/mapbox/mapbox-gl-native-ios/issues/240
Fixes: https://github.com/mapbox/mapbox-gl-native-ios/issues/240
2020-04-01 18:21:04 +03:00
Juha Alanen
a67aaca56b [core] Move logging off the main thread 2020-04-01 11:17:43 +03:00
Thiago Marcos P. Santos
349c6153de [build] Disable clang-format for generated code (#16358)
The code should be human readable but it is more important
if the code in the generator itself is easier to understand.

Nobody wants to play clang-format golf with these generators.
2020-03-31 22:48:56 +03:00
Thiago Marcos P. Santos
1c5e0ee31e [core] Fix misc-* errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +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
2ca3fc24a1 [core] Fix bugprone-string-integer-assignment errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
31975e6083 [core] Fix bugprone-integer-division errors
As reported by clang-tidy-8.too_small
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
0f235ac6d5 [core] Fix bugprone-macro-parentheses errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
5bb7ebd7de [core] Fix bugprone-move-forwarding-reference errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
b4e9c0bd11 [core] Fix bugprone-too-small-loop-variable errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
7f422e8696 [core] Fix google-build-explicit-make-pair errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
2280a8a752 [core] Fix google-default-arguments errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
62b543e44a [core] Fix google-explicit-constructor errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
65f4df5190 [core] Fix google-readability-casting errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Mikko Pulkki
a6ba6c0e85 Fix assert on gfx resource cleanup 2020-03-30 18:01:39 +03:00
zmiao
e9b99a5233 Address review finding
Remove unncessary condition check
2020-03-26 14:13:59 +02:00
zmiao
848f48ac27 [core] Fix within meridian issue 2020-03-26 14:13:59 +02:00
Mikhail Pozdnyakov
735fc0a4dc [core][tile mode] Share seenCrossTileIDs across all placeLayer() calls
Thus we obviate lots of repeated operations for already placed symbols.
2020-03-25 15:11:41 +02:00
Mikhail Pozdnyakov
313844b1da [core][tile mode] Place tile intersecting labels first, across all layers
Thus, we reduce the amount of label cut-offs in Tile mode.

Before, labels were arranged within one symbol layer (one bucket),
which was not enough for several symbol layers being placed at the
same time.
2020-03-25 15:11:41 +02:00
Mikhail Pozdnyakov
f5430ca33c [core] Introduce map mode specific Placement implementations 2020-03-25 15:11:41 +02:00
Mikhail Pozdnyakov
7ba5d5e2dd [core] Introduce Placement::placeLayers() 2020-03-25 15:11:41 +02:00
Mikhail Pozdnyakov
7234cb3968 [core] Ability to set source-layer setProperty method 2020-03-24 20:53:55 +02:00
Mikhail Pozdnyakov
5f1847d9a2 [core] conversion::Layer uses setProperty API to set max/min zoom & filter 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
Thiago Marcos P. Santos
76b99eb8e8 [core] Fix modernize-deprecated-headers errors
As reported by clang-tidy-8.
2020-03-23 20:05:40 +02:00
Thiago Marcos P. Santos
cee3910f17 [core] Fix modernize-return-braced-init-list 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