Leaflet Map does not Center to Location after search
See original GitHub issueHi,
For some reason, the map does not center to the point of search result. It is able to autoComplete, but nothing happens after that.
I tried to check the object output from the search.
mymap.on('geosearch/showlocation', function(result) { console.log(result); });
However, it returned a “TypeError: Cannot convert undefined or null to object”.
Hope that someone can assist. Thank you!!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
leaflet map does not centre correct - Stack Overflow
The map is not centred to the bounds, but the centre is more north from the markers. If zoomed in to much the...
Read more >leaflet - The marker and center map are not in the right place
I'm starting use the Leaflet. I put a marker to test but neither the marker nor the center are in the right local...
Read more >How to fix marker in center of leaflet map after user will drag ...
Hi I am using a custom map on my node add form. My marker is set to my current location using lat and...
Read more >first render works, second render is not centered
Hello all, I have a mysterious problem where a simple map (just a single marker) renders fine the first time, but a second...
Read more >Controlling Zoom and Pan | Maps JavaScript API
The following map demonstrates the default behavior for map interactions ... Note: The gestureHandling option does not apply to the Street View service....
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
Looks like once I updated from 3.0.0 to 3.0.5 the problem is gone.
I’m getting the same thing with version 3.6.0 Has anyone figured it out?
Uncaught (in promise) TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at i.showResult (SearchControl.ts:412:28) at SearchControl.ts:404:12