-
Notifications
You must be signed in to change notification settings - Fork 953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nearestPointOnLine throws Error: coordinates must contain numbers #2808
Comments
Looks similar to #2807. I see the last two positions in your second line are redundant (the same). Can you try using the turf |
Yes, that did the trick! I used this to find the nearest point next to the mouse cursor on the LineString. If the zoom was too low, it threw the error. Now with cleanCoords, it is working also on low zoom levels!
|
@twelch Unfortunately I discovered an issue with cleanCoords. It does not seem to remove duplicates which again result in this error:
Output of feature:
Output of line:
|
I have a curious problem. I am using turf.nearestPointOnLine with two different lines. It is working perfectly fine with line1, but line2 is throwing me this Error:
Error: coordinates must contain numbers
Honestly I don't see the difference...
Here is my code:
The text was updated successfully, but these errors were encountered: