diff options
author | Ansis Brammanis <ansis@mapbox.com> | 2019-10-23 17:21:38 -0400 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-10-24 15:39:10 +0300 |
commit | 4fb75ba32cf98f04ad817ff51407c0a428202a7a (patch) | |
tree | 8f4a9a7266982394660ecde9233ea6b74c0edae0 | |
parent | 744102d95524f6ae3b451f9cfd726651008fcd6b (diff) | |
download | qtlocation-mapboxgl-4fb75ba32cf98f04ad817ff51407c0a428202a7a.tar.gz |
[core] avoid edges for labels that use text-variable-anchors
to prevent clipped labels in rendered image tiles.
-rw-r--r-- | src/mbgl/text/placement.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/text/placement.cpp b/src/mbgl/text/placement.cpp index 4c18e3ba25..ecc8f93032 100644 --- a/src/mbgl/text/placement.cpp +++ b/src/mbgl/text/placement.cpp @@ -164,12 +164,12 @@ void Placement::placeBucket( auto partiallyEvaluatedIconSize = bucket.iconSizeBinder->evaluateForZoom(state.getZoom()); optional<CollisionTileBoundaries> avoidEdges; - if (mapMode == MapMode::Tile && - (layout.get<style::SymbolAvoidEdges>() || - layout.get<style::SymbolPlacement>() == style::SymbolPlacementType::Line)) { + if (mapMode == MapMode::Tile && (layout.get<style::SymbolAvoidEdges>() || + layout.get<style::SymbolPlacement>() == style::SymbolPlacementType::Line || + !layout.get<style::TextVariableAnchor>().empty())) { avoidEdges = collisionIndex.projectTileBoundaries(posMatrix); } - + const bool textAllowOverlap = layout.get<style::TextAllowOverlap>(); const bool iconAllowOverlap = layout.get<style::IconAllowOverlap>(); // This logic is similar to the "defaultOpacityState" logic below in updateBucketOpacities |