views:

479

answers:

3

As per my requirement in need to search twitter and display user's location on map. Can anyone help me identifying longitude and latitude from search api result?

+1  A: 

Last time I looked it didn't include it officially, unless the specific client (such as an iphone client) specifically updated your location to lat+long coordinates.

When I did something similar I passed the Twitter RSS output through an rss geotagging service, then used the output from that to map. It worked, but 99% of the tweets were just city centres, so it was pretty pointless :-(

Steven Robbins
Can you please share which geotagging service did you use?
Software Enthusiastic
+1  A: 

Twitter hasn't released their new geocoding API yet. Twitter's API Documentation is available here.

http://apiwiki.twitter.com/Twitter-API-Documentation

As you can see, most of the current API methods return an empty "geo" tag. Once Twitter has rolled out their geo implementation, this tag will be populated.

Eclipsed4utoo
A: 

You'd probably be best to see what "location" the user has set then use a geo-coding api to try and convert that location into lat/lng.

e.g. use http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-users%C2%A0show to find out the user's location, then use google's geocoding API (http://code.google.com/apis/maps/documentation/geocoding/) to do the rest.

Also you would probably want to do some pre-processing on the location to see if it's already a lat/lng pair (as some users update their location in this manner).

John Montgomery