Closed wheercool closed 4 years ago
@smeijer I am interested to add more providers to this module. can you please describe the required steps we need to fix this issue. and the required changes to add new providers (@types and leaflet-geosearch). I have tried but I failed!
@Heni-ghodbane what did you try exactly, and what failed?
I see that LocationIQProvider
is indeed not being re-exported, but it should still be possible to import it directly from 'leaflet-geosearch/lib/providers/locationIQProvider.js'
, maybe that's something that this library should stimulate anyway, to reduce the bundle size.
At this moment, all (apparently minus LocationIQ) providers are included in the bundle. Which doesn't make sense when you only want to use one.
I have downloaded the project and the @types in order to fix that import problem, and as a next step I wanted to implement 2 other providers but I'm a little bit confused.
@smeijer I have just imported (Angular service) as you mentioned above and it works 👍
import locationIQProvider from 'leaflet-geosearch/lib/providers/locationIQProvider.js';
The bug has been fixed in vNext
, and will be released soon(ish).
@Heni-ghodbane , you've mentioned that you wanted to add more providers to the library. Which providers where you considering when you wrote that?
I can focus on writing instructions in the scope of #215 if your still interested.
@smeijer thanks for your comment, these 2 APIs: mapquestapi : http://www.mapquestapi.com/geocoding/v1/address?key=userKey&limit=5&location= openrouteservice : https://api.openrouteservice.org/geocode/autocomplete?api_key=userKey&text=
Closing this issue as the ongoing discussion is out of context. @Heni-ghodbane, Can we continue the docs/provider discussion here? (As written there, I've updated the docs :slightly_smiling_face: )
The export of the provider has been fixed in leaflet-geosearch v3
, which has been released :tada:
Steps to reproduce: (from docs)
but LocationIQProvider is not defined