Skip to content
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

Invalid LatLng object: (NaN, NaN) on a Polyline #70

Open
rodriguesrl opened this issue May 14, 2020 · 1 comment
Open

Invalid LatLng object: (NaN, NaN) on a Polyline #70

rodriguesrl opened this issue May 14, 2020 · 1 comment
Assignees

Comments

@rodriguesrl
Copy link

Hello, I'm having an issue enabling the transform of a specific polyline, it only happens on that angle and i have no idea what might be causing this.

const test0 = [[-37.726626484318366, 140.4386936336438], [-37.72662681154198, 140.43865956345152]];
let line = L.polyline(test0, { color: 'black', transform: true }).addTo(this.map);
line.transform.enable({
      rotation: true,
      scaling: false,
    });

This is the stacktrace of the error:
image

Let me know if you need any further info.

@w8r w8r self-assigned this May 27, 2020
@nbioret
Copy link

nbioret commented Jun 4, 2020

Hello, I think I'm having a similar issue. It occurs when my bounding box is very narrow

line = [[43.33590744464275, -0.3963140790767437], [43.33593313218462, -0.3956736383198142], [43.335944134296874, -0.39494411645328126]]

When looking at the code, I think there is a division by 0 in L.PathTransform.pointOnLine function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants