smeijer / leaflet-geosearch

A geocoding/address-lookup library supporting various api providers.
https://smeijer.github.io/leaflet-geosearch/
MIT License
1.02k stars 270 forks source link

Error when update version #376

Open elsasantos opened 9 months ago

elsasantos commented 9 months ago

Discussed in https://github.com/smeijer/leaflet-geosearch/discussions/375

Originally posted by **elsasantos** October 2, 2023 Hi everyone, In the last two weeks we have come across an problem with leaflet-geosearch. We use the search, which correctly returns the various addresses, but when clicking, it does not assume the new address and does not update the new marker on the map (leaflet). What happens? In the search fuction, when que nominatim.openstreetmap.org/reverse is called, the new position is not in the parameter. I have this error: error: { code: 400, message: "Parameter 'lon' missing." } I try updated the leaflet-geosearch plugin version in my project from 2.7.0 to 3.6.1. I followed the guide https://github.com/smeijer/leaflet-geosearch#using-with-leafletjs but it didn't work, I get this error when implementing 'const searchControl = new GeoSearchControl': "Only a void function can be called with the 'new' keyword.ts(2350)" What can I do in this case? Can anyone help? Thanks