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

[BUG] When the zoom level is set in baseMap, it is automatically converted to an integer. #947

Open
YongGoose opened this issue Feb 8, 2025 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers status: new

Comments

@YongGoose
Copy link
Contributor

YongGoose commented Feb 8, 2025

Description

If you set minZoom or 'maxZoom' to a float value like 2.5, it will automatically be converted to 2.

{
  minzoom: 2.5,
  maxzoom: 20,
  sql:
    "SELECT id, tags, geom " +
    "FROM osm_boundary " +
    "WHERE tags ->> 'admin_level' = '2' " +
    "AND tags ->> 'maritime' = 'yes';",
}

Environment

  • Browser/Version: chrome
  • Version: 0.8.1

Expected vs Actual Behavior

  • Expected: Setting minZoom to 2.5 should apply it when the zoom level is 2.5 or higher.
  • Actual: However, it actually applies when minZoom is 2.0 or higher.

Attachments (Optional)

Maritime boundaries should be applied from zoom level 2.5 and above, but they can be seen applying from 2.0.

Expected

Image

Actual

Image

@YongGoose YongGoose added the bug Something isn't working label Feb 8, 2025
@YongGoose
Copy link
Contributor Author

YongGoose commented Feb 8, 2025

@bchapuis

If this is a bug, it could be a sub-issue of the below issue.

@bchapuis
Copy link
Member

bchapuis commented Feb 8, 2025

I believe the java object uses an integer instead of a double for the zoom level. We can indeed change this as it better corresponds to the maplibre style specification.

@YongGoose
Copy link
Contributor Author

I believe the java object uses an integer instead of a double for the zoom level. We can indeed change this as it better corresponds to the maplibre style specification.

I believe these two classes are definitely related!

If this issue is not resolved by next week, I will take care of it myself.

PS. I am not a member of the Apache Baremaps repository, so I don't have the permissions to register this as a sub-issue. Would you mind handling this? 😅

I think it would be appropriate for these two issues to be registered as sub-issues of the #927.

@bchapuis
Copy link
Member

bchapuis commented Feb 8, 2025

Thanks for the clarification. I attached it as a sub issue of #927.

@bchapuis bchapuis added the good first issue Good for newcomers label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers status: new
Projects
None yet
Development

No branches or pull requests

2 participants