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

Unable to get appropriate result on passing dynamic object with hardcoded array in IsPointInside #112

Closed
areox24 opened this issue Dec 5, 2016 · 1 comment
Labels
no-issue It's not an issue with the library itself. Please use Stack Overflow instead

Comments

@areox24
Copy link

areox24 commented Dec 5, 2016

var latling = { "latitude": 73.06831, "longitude": 33.6663874 };
if (isPointInside(
latling,
[
{ latitude: 73.06015491485596, longitude: 33.669318391264554 },
{ latitude: 73.07549715042114, longitude: 33.67733633656512 },
{ latitude: 73.08568954467773, longitude: 33.66356786778117 }
]
)

Works

But when

var lat=Float value from Database;
var long=Float value from Database;
var latling = { "latitude": lat, "longitude": long};

object is passed,

The result is always false, as if 1st argument was incorrect. But no error is generated in log

Kindly guide me in the right direction

-Platform : Node Js
Npm

@JacobJT
Copy link

JacobJT commented Feb 15, 2017

Double check you have the values you think you do when you create that latling (also, check your spelling). If you're pulling from a database perhaps you're doing an asynchronous operation and trying to execute before you actually have data?

@manuelbieh manuelbieh added the no-issue It's not an issue with the library itself. Please use Stack Overflow instead label May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue It's not an issue with the library itself. Please use Stack Overflow instead
Projects
None yet
Development

No branches or pull requests

3 participants