![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
leaflet-control-geocoder
Advanced tools
A simple geocoder for Leaflet that by default uses OSM/Nominatim to locate places, but also supports Bing Locations API and can easily be extended to support other providers.
See the Leaflet Control Geocoder Demo.
var map = L.map('map').setView([0, 0], 2);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.Control.geocoder().addTo(map);
This is the geocoder control. It works like any other Leaflet control, and is added to the map.
L.Control.Geocoder(options)
Option | Type | Default | Description |
---|---|---|---|
collapsed | Boolean | true | Collapse control unless hovered/clicked |
position | String | "topright" | Control position |
placeholder | String | "Search..." | Placeholder text for text input |
errorMessage | String | "Nothing found." | Message when no result found / geocoding error occurs |
geocoder | IGeocoder | new L.Control.Geocoder.Nominatim() | Object to perform the actual geocoding queries |
Method | Returns | Description |
---|---|---|
markGeocode( result) | this | Marks a geocoding result on the map |
Uses Nominatim to respond to geocoding queries. This is the default
geocoding service used by the control, unless otherwise specified in the options. Implements IGeocoder
.
Unless using your own Nominatim installation, please refer to the Nominatim usage policy.
L.Control.Geocoder.Nominatim(options)
Option | Type | Default | Description |
---|---|---|---|
serviceUrl | String | "http://nominatim.openstreetmap.org/search/" | URL of the service |
Uses Bing Locations API to respond to geocoding queries. Implements IGeocoder
.
Note that you need an API key to use this service.
L.Control.Geocoder.Bing(<String> key)
An interface implemented to respond to geocoding queries.
Method | Returns | Description |
---|---|---|
geocode( query, callback, context) | GeocodingResult[] | Performs a geocoding query and returns the results to the callback in the provided context |
An object that represents a result from a geocoding query.
Property | Type | Description |
---|---|---|
name | String | Name of found location |
bounds | L.LatLngBounds | The bounds of the location |
center | L.LatLng | The center coordinate of the location |
FAQs
Extendable geocoder with builtin support for OpenStreetMap Nominatim, Bing, Google, Mapbox, MapQuest, What3Words, Photon, Pelias, HERE, Neutrino, Plus codes
The npm package leaflet-control-geocoder receives a total of 0 weekly downloads. As such, leaflet-control-geocoder popularity was classified as not popular.
We found that leaflet-control-geocoder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.