stefanocudini / leaflet-search

Search stuff in a Leaflet map
https://opengeo.tech/maps/leaflet-search/
MIT License
782 stars 334 forks source link

Fix the records cache not filling properly when the layer is set dynamically #262

Closed yaso9 closed 3 years ago

yaso9 commented 4 years ago

The _fillRecordsCache function uses the layer property passed in as an option to determine whether it should fill the records cache using a layer. If the layer was not specified at the time of creation and instead specified dynamically via setLayer, this does not work because the layer property in options is not updated by setLayer.

stefanocudini commented 3 years ago

thankyou @yaso9 I'll test it soon, before merge

stefanocudini commented 3 years ago

@yaso9 published in npm leaflet-search@2.9.9

Mathieu-DA commented 3 years ago

the merged change breaks the entire search feature #265

stefanocudini commented 3 years ago

solved from version 3.0.0 published in npm