Closed Joel-Wong0794 closed 3 years ago
Me too getting the same error. Please let know if you've found a solution for this.
Same problem, the source of an error seems to be located in https://github.com/smeijer/leaflet-geosearch/blob/develop/src/SearchControl.ts#L360
SearchControl.ts:412 Uncaught (in promise) TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at i.showResult (SearchControl.ts:412)
at SearchControl.ts:404
Looks like once I updated from 3.0.0 to 3.0.5 the problem is gone.
@NightFury555 & @rawhasan, which version do you use?
Seems like problem already fixed in the latest patch releases. I'll close this issue, but if you're still getting this behaviour, please, re-open it.
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 (
Hello nobbiexxx
All i did was to update the version in the link and script.
<link rel="stylesheet" href="https://unpkg.com/leaflet-geosearch@3.6.0/dist/geosearch.css" />
<script src="https://unpkg.com/leaflet-geosearch@3.6.0/dist/geosearch.umd.js"></script>
This worked for me, I hope it does for you.
Hi,
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!!