This class will help you add or use search bar for geocoding with a Leaflet map.
const jawgPlaces = new JawgPlaces.Leaflet({
accessToken: 'Access-Token',
L: L,
}).addTo(map)
// map.addControl(jawgPlaces)
Adds the control to the given map. You can alternatively use map.addControl(jawgPlaces)
.
from Leaflet
When Jawg Places is not used as a control within your map, you will need to call this function.
from Leaflet
itself
Search a random text, lat/lon or GID using Jawg Places.
All features are points with properties, more details on our documentation.
See JawgPlacesOptions.reverse for lat/lon search and JawgPlacesOptions.place for GID search.
The text to search using Jawg Places
A promise with the feature collection received from Jawg Places
Open the result list with elements from the FeatureCollection. We use the properties.label
field of each features.
This will trigger JawgPlacesOptions.onFeatures callback.
Use it if you want to display specific results or add new elements.
Feature Collection of geocoded points.
This class will help you add or use search bar for geocoding with a Leaflet map.