On Oct 9, 10:06 am, CIARAN <[email protected]> wrote: > if (point.lat,point.lng).distanceFrom(55.010455,-7.317671) < 5
There are a number of things wrong with this. Co-ordinates need to be GLatLng objects, not numbers surrounded by brackets. The distance is given in metres, not miles. The "if" condition needs to be completely enclosed in brackets too: you should have got a syntax error flagged in your browser for that. And I'm not sure where "document.write" is to write to; that may not work either. Did you mean "alert"? point is already a GLatLng object, so you could do var myLocation = new GLatLng(55.010455,-7.317671); if (point.distanceFrom(myLocation) < 8047) And yes, a link to failing code is definitely to be preferred, although glaring errors in a small amount of code can sometimes be spotted "by hand". There's no guarantee the above analysis is complete though, which is why the posting guidelines ask for a link. Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
