[ 1 post ]

Steven Olmsted

YUI Contributor

  • Username: solmsted
  • Joined: Wed Apr 14, 2010 1:47 pm
  • Posts: 82
  • Location: Richmond, VA
  • GitHub: solmsted
  • Gists: solmsted
  • IRC: solmsted
  • Offline
  • Profile

pidgets.geoip queries the wrong ip address

Post Posted: Thu May 12, 2011 1:54 pm
+0-
YQL is a clever fallback when the geolocation api is missing, but the current query isn't working properly.

Here's a quick test. http://jsfiddle.net/zwXq6/
When using the native geolocation api it's working fine on Firefox and Chrome.
On IE 8, using the pidget.geoip query, it always returns 37.424900054932, -122.0074005127

I did some poking around to find out why. It looks like you are using this query: 'select * from pidgets.geoip'

I typed that query into the YQL Console to see what happens.

http://developer.yahoo.com/yql/console/ ... eswithkeys

The ip address that gets returned with the location information (216.39.58.78) is not my ip address.
Navigating to 216.39.58.78 from my browser gives me a yahoo error page.
So I assume pidget.geoip is returning the location of the YQL server.

I'm not familiar with many YQL tables but I assume you could do something like
select * from pidgets.geoip where ip = (select ip from someplace)

Also a minor thing, the example code on the YUI Gallery page has a typo in it. It tries to call Y.Geo.getCurrentLocation, but the actual function is Y.Geo.getCurrentPosition
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum