It turns out that there's at least one point in your fPoints array that
is Not A Number. I think it happens when the bearing is due East.
The atan2(), sin() and cos() functions shouldn't ever return NaN, and
your only sqrt() is always operating on a non-negative value, so my
guess would be that the asin() on the line
var d = 2*asin(sqrt( ... ));
might be being passed a number greater than 1.
I suggest creating a temporary copy of your page and adding the line
if (isNaN(d)) { crash }
or if that doesn't catch it
if (isNaN(latN)) { crash }
Catch the crash with a debugger and investigate the details of the
calculations that caused the NaN.
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---