maptiler / maptiler-geocoding-control

The Javascript & TypeScript Map Control component for MapTiler Geocoding service! Easy to be integrated into any JavaScript mapping application.
https://maptiler.com/cloud/geocoding
BSD 3-Clause "New" or "Revised" License
28 stars 4 forks source link

fixed clearing map features on map style switching #30

Closed zdila closed 6 months ago

zdila commented 6 months ago

Objective

fix clearing map features on map style switching

dabreegster commented 2 months ago

I think this breaks when used in https://github.com/dimfeld/svelte-maplibre/. There's some handling there to preserve sources and layers when the style changes: https://github.com/dimfeld/svelte-maplibre/blob/d7697024d187c9e94504f8220a8b19fbc4ecd055/src/lib/MapLibre.svelte#L266 I understand this library is used across a wide range of places, and the change in this PR is probably desirable for most of them. Would it be reasonable to disable it with a boolean option defaulting to the current behavior?

zdila commented 2 months ago

Hi @dabreegster,

Thanks for your comment. Please open a new issue.