-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Cubic bezier interpolation not respected for some layout property values #12812
Comments
Just to be clear, the problem is not that interpolation isn't working in between integer zoom levels ( |
Yes. The behavior on native (I think) is that the last value is just used across all features in the style layer. |
So we do some special case evaluation for symbol sizes here: mapbox-gl-native/src/mbgl/programs/symbol_program.hpp Lines 161 to 172 in 5fb096a
In your That gets passed into the mapbox-gl-native/include/mbgl/style/expression/interpolator.hpp Lines 35 to 37 in 5fb096a
... and since In contrast, GL JS uses the It's the same as native's mapbox-gl-native/src/mbgl/util/interpolate.cpp Lines 8 to 19 in 5fb096a
The I think the fix is just to use the same interpolation factor in gl-native. You can tell from my very literal description of the problem that I don't have the strongest conceptual grasp of how this code is supposed to work. I'll put together a PR and hopefully you can experiment to see you get the behavior you expect with it? |
Fixes issue #12812. Using `util::interpolationFactor` handles the case where inputLevels.min == inputLevels.max, so it returns an interpolation factor of "0" instead of dividing by 0.
Fixes issue #12812. Using `util::interpolationFactor` handles the case where inputLevels.min == inputLevels.max, so it returns an interpolation factor of "0" instead of dividing by 0.
Fixed with #12826. |
Fixes issue #12812. Using `util::interpolationFactor` handles the case where inputLevels.min == inputLevels.max, so it returns an interpolation factor of "0" instead of dividing by 0.
Fixes issue #12812. Using `util::interpolationFactor` handles the case where inputLevels.min == inputLevels.max, so it returns an interpolation factor of "0" instead of dividing by 0.
Steps to reproduce
text-size
ortext-letter-spacing
. Can be either zoom or data dependent.E.g.:
Non-nested expressions also exhibit this behavior, e.g.
Please ping me for a copy of the stylesheet in question if needed, as I do not want to post it publicly.
Expected behavior
Value varies according to the interpolation defined in the style (as it does on mapbox-gl-js).
Actual behavior
All values for features in that style layer seems to just be the last stop value. This is happening in iOS, MacOS, and Android.
From testing various style definitions:
text-size
andtext-letter-spacing
.text-color
.text-size
, and I don't know why.Configuration
Mapbox SDK versions: Mapbox Maps SDK for iOS 4.4.0-alpha.1, Mapbox Maps SDK for Android 6.4.0 (I think – the versions in the latest Mapbox Studio Preview apps)
/cc @mapbox/gl-core @mapbox/maps-ios @mapbox/maps-android
The text was updated successfully, but these errors were encountered: