-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Problem
The bundled Control.Geocoder.js (from leaflet-control-geocoder) uses trailing slashes in the Nominatim API endpoints, which now return 404 errors.
Affected lines in Control.Geocoder.js:
- Line 343:
this.options.serviceUrl + 'search/' - Line 370:
this.options.serviceUrl + 'reverse/'
Resulting URLs (404):
https://nominatim.openstreetmap.org/search/?q=...https://nominatim.openstreetmap.org/reverse/?lat=...
Correct URLs (working):
https://nominatim.openstreetmap.org/search?q=...https://nominatim.openstreetmap.org/reverse?lat=...
Solution
Remove the trailing slashes:
- L.Control.Geocoder.jsonp(this.options.serviceUrl + 'search/', L.extend({
+ L.Control.Geocoder.jsonp(this.options.serviceUrl + 'search', L.extend({- L.Control.Geocoder.jsonp(this.options.serviceUrl + 'reverse/', L.extend({
+ L.Control.Geocoder.jsonp(this.options.serviceUrl + 'reverse', L.extend({This aligns with the current upstream library which no longer uses trailing slashes.
Environment
- ProcessWire 3.x
- FieldtypeLeafletMapMarker (latest from this repo)
- Tested in Firefox/Chrome
Metadata
Metadata
Assignees
Labels
No labels