Open dasuma opened 2 years ago
@dasuma can you provide your code snippet?
` 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 }
}
} `
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
yeah, my response un false, i dont understan why? any problem with specific version? i have "node-geometry-library": "^1.2.6",
im using your libary but i dont understan , the answer always is false+
` 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} ] );
i used this version "node-geometry-library": "^1.2.6",