Open macbeez opened 2 years ago
Thanks for the question. Although it's a bit old, I think this is a duplicate of https://github.com/Esri/esri-leaflet/issues/864 and you may find some good information there.
I agree that the other issue has some good ideas to consider. To add to all that, perhaps part of the solution may entail writing a custom provider
for the L.esri.Geocoding.geosearch
control.
This library has several provider
s, and looking into the patterns in their source files may help illustrate what would be required to write a brand new one to interact with your proposed "local database with coordinates and location names".
https://esri.github.io/esri-leaflet/api-reference/controls/geosearch.html#providers
https://github.com/Esri/esri-leaflet-geocoder/tree/master/src/Providers
Hello, @monicabernard I am also trying to implement the ArcGIS map's offline functionality in Javascript. I need to download offline map tiles which are stored locally and can display them when there is no connectivity. I am using Esri-leaflet to show the map inside my Ionic 6/ Angular app. If you can point me to some resources from which I can get some references and implement them. That will be very helpful.
My goal is to create a completely offline mapping solution. I have found that the leaflets library works really well and provides what I need for the most part. I have created my offline map tiles which are stored locally and can display them in a browser successfully.
What I want to do now is to add a search bar to the map which will allow the user to type the name of a location and navigate to it. I found the following example which is exactly what I want from a UI perspective. However it queries ArcGIS for the geocoding. Is there a way to get this functionality to work completely offline? I assume that I would need a local database with coordinates and location names but I don't see how I would hook a local database into this library.