Closed nitindhar7 closed 5 years ago
nitindhar7 I had this issue too when is was using an array.
[
"Aalborg Airport": {latitude: '57.0952', longitude: '9.85606'},
"Newport News": {latitude: '36.9805', longitude: '-76.4295'},
...
]
I converted it to an object and now I'm not getting that error anymore.
This function was massively simplified in v3 which will be released shortly.
I just lost some time trying to debug this message:
The data I was passing in for the
coords
argument to thefindNearest
function looks like this:From the examples, the structure of
coords
looks like:or generally speaking:
The code doesn't seem to be expecting a top level string key (like "Brandenburg Gate, Berlin" in the readme example):