Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot filter based off non-integer zooms #2262

Open
kaspesi opened this issue Nov 12, 2024 · 0 comments
Open

Cannot filter based off non-integer zooms #2262

kaspesi opened this issue Nov 12, 2024 · 0 comments
Labels
bug 🪲 Something is broken!

Comments

@kaspesi
Copy link

kaspesi commented Nov 12, 2024

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.

Notes / preliminary analysis

Additional links and references

@kaspesi kaspesi added the bug 🪲 Something is broken! label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something is broken!
Projects
None yet
Development

No branches or pull requests

1 participant