Advanced use of Google Latitude
Where I am? Or how to permanently destroy privacy and show everyone where to look for me!
Everyone who used the google maps version for mobile phones probably already know about the great feature - Google Latitude . Having a gps receiver and activating it in a mobile application you get the opportunity to send your friends the current location, as well as, in turn, see their coordinates.
Great idea, but I want more!
Firstly - I want to have an api.
Secondly - I want to get the current GPS coordinates and write them to the track.
Well and most importantly - I want to show my position and track on the map in my blog
How to do this?
Until now, there is no api to latitude, but there was a great
Hooray, this solves all my problems!
And so
1 - Put the google map on the mobile device (for example, logging on to m.google.com )
2 - Activate Google Latitude there (you must have a google account or mail in gmail.com!)
3 - Go to the Google Location Badge and activate it
4 - Having received the code for the blog, look at userid
5 in it - And voila - at
www.google.com/latitude/apps/badge/api?user= YOUR&type= kml
or
www.google.com/latitude/apps / badge / api? user = YOURid & type = json Get
your coordinates in either KML or JSON format!
6 - Then it’s a matter of technique — to write a script periodically polling the coordinates and writing them to the database,
you can see the result
here.
An important point!
Knowing the USERID, you can get the user's coordinates ignoring all access restrictions in latitude. This is stated on the page, but it’s still strange that google offers to embed it in an iframe! My version has no such drawback, userid is hidden in a script running on the server.
Interesting moment!
It works even without a GPS receiver! The coordinates are tentatively determined by the nearest base stations.
sources
http://www.google.com/latitude/apps/badge
http://www.google.com/support/mobile/bin/answer.py?answer=144216
http://radar.oreilly.com/2009/05/googles-sneaky-launch-of-latitudes-location-sharing-api.html
UPD
Habraeffect did the trick, mytrails.ru had to patch right on the go, and besides , a very unpleasant problem was discovered in a cheap Dlinke through which the server is connected to the Internet. A number of problems were connected with this on the site. Request to everyone who has problems with the site to write in a personal email, I will fix it.