diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index 7328efd17b6..e81494b9134 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -2,6 +2,9 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to do so please see the [`Contributing Guide`](https://github.com/mapbox/mapbox-gl-native/blob/master/CONTRIBUTING.md) first to get started. +## master +- Don't default-show text/icons that depend on the placement of a paired icon/text [#12483](https://github.com/mapbox/mapbox-gl-native/issues/12483) + ## 6.4.0-alpha.1 - July 25, 2018 - Validate if gesture detector is able to handle gesture [#12375](https://github.com/mapbox/mapbox-gl-native/pull/12375) - Add a convenience method to check whether the map is in a destroyed state, MapView#isDestroyed [#12373](https://github.com/mapbox/mapbox-gl-native/pull/12373) @@ -29,7 +32,7 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to - Add LatLngForScreenCoordinate to MapSnapshotter API, This allows to convert a LatLng value to the x,y position on the MapSnasphot image [#12221](https://github.com/mapbox/mapbox-gl-native/pull/12221) - Expose multiple getCameraFor equivalent methods to convert a geometry or a bounds to a camera position with taking in account padding, tilt and bearing [#12290](https://github.com/mapbox/mapbox-gl-native/pull/12290) - Avoid race condition when calling getMapAsync from a non-UI thread when running instrumentation tests [#12308](https://github.com/mapbox/mapbox-gl-native/pull/12308) - + ## 6.2.1 - June 27, 2018 - Backport range alpha values from 0 to 1 with int color conversion [#12235](https://github.com/mapbox/mapbox-gl-native/pull/12235) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 1e606702c35..35d3fde6807 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,6 +2,9 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. +## master +- Don't default-show text/icons that depend on the placement of a paired icon/text [#12483](https://github.com/mapbox/mapbox-gl-native/issues/12483) + ## 4.3.0 ### Styles and rendering diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 001b3792d55..4cc0b910db6 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -2,6 +2,8 @@ # master +- Don't default-show text/icons that depend on the placement of a paired icon/text [#12483](https://github.com/mapbox/mapbox-gl-native/issues/12483) + ## Styles and rendering * Token string syntax (`"{token}"`) in `MGLSymbolStyleLayer` `text` and `iconImageName` properties is now correctly converted to the appropriate `NSExpression` equivalent. ([#11659](https://github.com/mapbox/mapbox-gl-native/issues/11659)) diff --git a/platform/node/CHANGELOG.md b/platform/node/CHANGELOG.md index d2b6c76ab1f..fee1ed8a51a 100644 --- a/platform/node/CHANGELOG.md +++ b/platform/node/CHANGELOG.md @@ -1,4 +1,5 @@ # master +- Don't default-show text/icons that depend on the placement of a paired icon/text [#12483](https://github.com/mapbox/mapbox-gl-native/issues/12483) - The `Map` constructor now accepts a `mode` option which can be either `"static"` (default) or `"tile"`. It must be set to `"tile"` when rendering individual tiles in order for the symbols to match across tiles. - Remove unnecessary memory use when collision debug mode is not enabled ([#12294](https://github.com/mapbox/mapbox-gl-native/issues/12294)) diff --git a/src/mbgl/text/placement.cpp b/src/mbgl/text/placement.cpp index 16dd94b3743..39b2584ef9b 100644 --- a/src/mbgl/text/placement.cpp +++ b/src/mbgl/text/placement.cpp @@ -254,9 +254,16 @@ void Placement::updateBucketOpacities(SymbolBucket& bucket, std::set& JointOpacityState duplicateOpacityState(false, false, true); + const bool textAllowOverlap = bucket.layout.get(); + const bool iconAllowOverlap = bucket.layout.get(); + + // If allow-overlap is true, we can show symbols before placement runs on them + // But we have to wait for placement if we potentially depend on a paired icon/text + // with allow-overlap: false. + // See https://github.com/mapbox/mapbox-gl-native/issues/12483 JointOpacityState defaultOpacityState( - bucket.layout.get(), - bucket.layout.get(), + textAllowOverlap && (iconAllowOverlap || !bucket.hasIconData() || bucket.layout.get()), + iconAllowOverlap && (textAllowOverlap || !bucket.hasTextData() || bucket.layout.get()), true); for (SymbolInstance& symbolInstance : bucket.symbolInstances) {