Geocoding fails when searchBounds are already in L.latLngBounds format
See original GitHub issueHi 👋
I am building a React app that uses React-leaflet
, esri-leaflet-geocoder.
Zooming into the map to 12+ and then typing the ESRI geocoder results in the following error with stack trace:
The bounds come in formatted as L.latLngBounds
but are transformed
with the expectation that they’re latLng
s, which results in an empty L.latLngBounds
object. A class check for latLngBounds
before transforming it/or not would probably do it.
Assuming you don’t want search bounds on the geocode search, this error can be avoided by setting the geocoder option { searchBounds: false }
https://github.com/Esri/esri-leaflet-geocoder/pull/115
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
L.esri.Geocoding.Geosearch | Esri Leaflet - ArcGIS Developers
If an integer (like 11 ) is passed, the geocoder will use the bounds of the map for searching only if the map...
Read more >google geocoding api - R error - subscript out of bounds
I am trying to run this code which takes a list of addresses and runs each one through Google's Geocode API (using function...
Read more >Esri Leaflet Geocoder Crash Course - LinkedIn
The search bounds are a L.latLngBounds object that allows you to limit the searching within latitude/longitude bounds.
Read more >Testing Nominatim Geocoder with Leaflet.js
I recently wrote a post about the Esri Geocoding plugin for the Leaflet.js web ... var searchBounds = L.latLngBounds([36.548091,-82.576010] ...
Read more >L.LatLngBounds - WRLD3D
All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m fine with closing this issue since it looks like it is not easily reproduced and we came to a good workaround. Thanks again for your attention!
it doesn’t appear to. i can’t see the problem you reported in the app below and its virtually identical to what you shared in your snippet.
https://github.com/kboul/react-esri-leaflet-geosearch
i’m happy to investigate further, but only with a repro case.