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

always is false #10

Open
dasuma opened this issue Sep 8, 2022 · 4 comments
Open

always is false #10

dasuma opened this issue Sep 8, 2022 · 4 comments

Comments

@dasuma
Copy link

dasuma commented Sep 8, 2022

im using your libary but i dont understan , the answer always is false+
image
` let response2 = PolyUtil.isLocationOnPath(
{lat: 25.771, lng: -80.19}, // point object {lat, lng}
[
// poligon arrays of object {lat, lng}
{lat: 25.774, lng: -80.19},
{lat: 18.466, lng: -66.118},
{lat: 32.321, lng: -64.757}
]
);

console.log(response2) // true  `

i used this version
"node-geometry-library": "^1.2.6",

@BunHouth
Copy link
Member

BunHouth commented Sep 8, 2022

@dasuma can you provide your code snippet?

@dasuma
Copy link
Author

dasuma commented Sep 8, 2022

`
import { PolyUtil} from "node-geometry-library";

export default class MapsController {

public async getCoverage({ request, response }) {

let response2 =   PolyUtil.isLocationOnPath(
  {lat: 25.771, lng: -80.19}, // point object {lat, lng}
  [
    // poligon arrays of object {lat, lng}
    {lat: 25.774, lng: -80.19},
    {lat: 18.466, lng: -66.118},
    {lat: 32.321, lng: -64.757}
  ]
);

console.log(response2) // true  


response.status(200);
return { 'res': response2 }

}

}
`

@BunHouth
Copy link
Member

BunHouth commented Sep 9, 2022

I'm still not clear about your issue. I'm don't find anything wrong. Response of PolyUtil.isLocationOnPath is true. Is it false on your code?

  {lat: 25.771, lng: -80.19}, // point object {lat, lng}
  [
    // poligon arrays of object {lat, lng}
    {lat: 25.774, lng: -80.19},
    {lat: 18.466, lng: -66.118},
    {lat: 32.321, lng: -64.757}
  ]
);

console.log(response) // true  

@dasuma
Copy link
Author

dasuma commented Sep 9, 2022

yeah, my response un false, i dont understan why? any problem with specific version? i have "node-geometry-library": "^1.2.6",

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

2 participants