mapbox-maps-ios
mapbox-maps-ios copied to clipboard
Cannot filter based off non-integer zooms
Environment
- Xcode version: 16.0
- iOS version: 18.1
- Devices affected: Simulator, iPhone 13 Pro Max
- Maps SDK Version: 24.6.1
Observed behavior and steps to reproduce
private func rankThresholdForZoomExpression() -> Exp {
return Exp(.interpolate) {
Exp(.linear)
Exp(.zoom)
11.0
1
12.0
5
13.0
10
14.0
100
}
}
exampleLayer.filter = Exp(.lte) {
Exp(.get) { "rank" }
rankThresholdForZoomExpression()
}
When zooming on the map, this interpolation is only done on integer values. If we add a step at 13.5 for example it is ignored.
Expected behavior
At zoom level 12.5, we would see 7.5 or 7 instead the value does not change until we reach zoom level 13, when it changes from 5 to 10.
Is it possible to do this, I have also tried using fractional steps and comparisons which also only evaluate on integers.
Is there any possible way have smoother filtering from zoom? Even just filtering when zoom is 12.5 would be great.