diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-03-25 17:03:52 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-04-02 11:50:52 +0300 |
commit | 5f4e33b1a3d14cdbebbfe724e51bdcba11f44437 (patch) | |
tree | 1c0d6fee60ad678f398196d2a7d7d47ab0ca167b /src/mbgl/text/placement.cpp | |
parent | 4bdb3ce200e1b6c7d1838d6ebabf18debd331e04 (diff) | |
download | qtlocation-mapboxgl-5f4e33b1a3d14cdbebbfe724e51bdcba11f44437.tar.gz |
[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.
Diffstat (limited to 'src/mbgl/text/placement.cpp')
-rw-r--r-- | src/mbgl/text/placement.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/text/placement.cpp b/src/mbgl/text/placement.cpp index 0436a3ccd5..eaea1114d6 100644 --- a/src/mbgl/text/placement.cpp +++ b/src/mbgl/text/placement.cpp @@ -1142,6 +1142,11 @@ bool Placement::hasTransitions(TimePoint now) const { transitionOptions.duration.value_or(util::DEFAULT_TRANSITION_DURATION); } +const std::vector<PlacedSymbolData>& Placement::getPlacedSymbolsData() const { + const static std::vector<PlacedSymbolData> data; + return data; +} + const CollisionIndex& Placement::getCollisionIndex() const { return collisionIndex; } |