>>What do you mean the map "hangs up"?
This is a GPS tracking page, if I reload the page again with calling IsWithinFixedGeofence() the way you said, the map showing the GPS location on google map fails to load.
>>The URL you gave me is giving me a "null is not an object" error on line 376, likely triggered by this line:
This shows null, because this GPS tracking page cannot find the data.csv on the web server, which is created when the GPS establishes a connection with the server.
The function populatedatatable reads the points from the data.csv and passes each of these points as "pt" and creates a corresponding marker on the map, to trace where the GPS has traveled.
This page reads the file from the web server, and then shows each point as a marker on Google maps.
>>the "point" object is showing up as null in my debugger, meaning that whatever value you are passing in here in the function argument:
[/SIZE]
Code:
IsWithinFixedGeofence(point)
{
}
[SIZE=2]
...is a null reference...
Well again, point is just a formal parameter, the actual parameter that is going inside is point pt when IsWithinFixedGeofence() is called within populatedatatable function
It's not a problem with the parameter "pt"
if I use this code
IsWithinGeofence(point)
{
....
...
if(distance <= minimiumdistance)
{
document.write(PointsOfInterest[i].lat);
}
}
It displays the correct value of lat in the case here -56.4856.
All I want to do is store
PointsOfInterest[i].lat, PointsOfInterest[i].lng and index i in three global variables from inside the function, which can then be called anywhere else in the file...
Best Regards