incubator-baremaps icon indicating copy to clipboard operation
incubator-baremaps copied to clipboard

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

Open YongGoose opened this issue 8 months ago • 4 comments

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 avatar Feb 08 '25 05:02 YongGoose