opensearch-project / dashboards-maps

:globe_with_meridians: User interface for the backend geospatial plugin which can be integrated with OpenSearch Dashboards and a home for all other map related features.
https://opensearch.org/docs/latest/dashboards/geojson-regionmaps/#custom-vector-maps-with-geojson
Apache License 2.0
17 stars 44 forks source link

[BUG] Custom layer get error when change zoom level #604

Closed junqiu-lei closed 5 months ago

junqiu-lei commented 5 months ago

What is the bug?

When adjust zoom values in custom layer, it will catch error and unable to show the layer.

Browser console error:

customImportMapDashboards.plugin.js:6 Error: layers.ee87a035-df8a-4da5-9455-16dd538a317e.minzoom: number expected, string found
    at Object.kn [as emitValidationErrors] (customImportMapDashb….plugin.js:6:246184)
    at Yt (customImportMapDashb….plugin.js:6:583615)
    at ee._validate (customImportMapDashb….plugin.js:6:606407)
    at ee.addLayer (customImportMapDashb….plugin.js:6:597550)
    at Map.addLayer (customImportMapDashb….plugin.js:6:834950)
    at addNewLayer (customImportMapDashb…plugin.js:16:375139)
    at Object.render (customImportMapDashb…plugin.js:16:376479)
    at handleBaseLayerRender (customImportMapDashb…plugin.js:13:311018)
    at customImportMapDashb…plugin.js:13:294673
    at os (osd-ui-shared-deps.js:435:83209)

Tested in OSM layer and document layers, no issue happened there.

How can one reproduce the bug?

  1. Create custom layer
  2. Edit zoom levels under settlings
  3. Update

What is the expected behavior?

The zoom level should be able to adjust properly in custom layer.

What is your host/environment?

3.0.0 main branch