Take My Privacy, Please!
November 23, 2012 10:44 AM Subscribe
I'm trying to hack together an OS X script that's dependent upon my location. Problem is, Apple's location services doesn't know where my home router is - and I don't have an iOS device to tell it. Is there any way I can suggest or hint to the server where my IP is located?
Response by poster: Yep, I just need lat/long. More specificity, the better (I'm playing around with the Dark Sky API, and I want to make sure it can change when my location changes).
posted by Apropos of Something at 11:00 AM on November 23, 2012
posted by Apropos of Something at 11:00 AM on November 23, 2012
Many location services use SkyHook. You can update your router location here. Not sure if that will filter down to Apple or not.
posted by blue_beetle at 11:02 AM on November 23, 2012
posted by blue_beetle at 11:02 AM on November 23, 2012
Just hardcode your home IP as 'home'. Or fallback to a IP geolocation service.
posted by wongcorgi at 11:37 AM on November 23, 2012
posted by wongcorgi at 11:37 AM on November 23, 2012
Yeah I'd hard-code an exception for your home for now. It's odd that your IP isn't in Apple's database. Have you checked on Google and Bing? They have their own databases.
posted by Nelson at 12:03 PM on November 23, 2012
posted by Nelson at 12:03 PM on November 23, 2012
Response by poster: Nelson: "Have you checked on Google and Bing? They have their own databases."
It would seem that Google's database knows where I am, which makes sense - I've got Android devices in the house. I have yet to find a way to access Google's lat/long from bash, but if anyone knows how, it'd be a super help...
posted by Apropos of Something at 12:19 PM on November 23, 2012
It would seem that Google's database knows where I am, which makes sense - I've got Android devices in the house. I have yet to find a way to access Google's lat/long from bash, but if anyone knows how, it'd be a super help...
posted by Apropos of Something at 12:19 PM on November 23, 2012
Response by poster: Note: I can tell there's a CoreLocation problem with my home router because the Dates and Times system pref panel in OS X can't find my time zone either.
posted by Apropos of Something at 12:29 PM on November 23, 2012
posted by Apropos of Something at 12:29 PM on November 23, 2012
There is a Google location API. It's fairly trivial to call via curl.
https://developers.google.com/latitude/v1/currentLocation
posted by wongcorgi at 2:56 PM on November 23, 2012
https://developers.google.com/latitude/v1/currentLocation
posted by wongcorgi at 2:56 PM on November 23, 2012
Response by poster: wongcorgi: "There is a Google location API. It's fairly trivial to call via curl.
https://developers.google.com/latitude/v1/currentLocation"
That seems to require access to your Google login info for the Latitude current location stuff. If possible, I'd like to use the computer's current location for this operation.
posted by Apropos of Something at 7:05 PM on November 23, 2012 [1 favorite]
https://developers.google.com/latitude/v1/currentLocation"
That seems to require access to your Google login info for the Latitude current location stuff. If possible, I'd like to use the computer's current location for this operation.
posted by Apropos of Something at 7:05 PM on November 23, 2012 [1 favorite]
Yeah, I think you're right. Chrome has the "what is my current location" baked in to it and it's very easy to use from Javascript, but I'm sure you don't want to launch a whole Chrome instance to do it. I'm not sure the lookup API Chrome uses is exposed by Google elsewhere. The Google Geolocation API is closer to what you want, but it seems to only work with WiFi and cell tower data, not IP address. But the WiFi thing may work for you, worth a shot.
There's a lot of IP -> location services out there, really, the problem is finding a good free one. A google search for [ip address to location api] turns up some promising leads, I've just never used any of them. Maybe hostip.info?
The Geoloqi API may also be able to help you, it's a cool product, but now that ESRI has bought the company who knows what its future is.
posted by Nelson at 9:08 AM on November 24, 2012
There's a lot of IP -> location services out there, really, the problem is finding a good free one. A google search for [ip address to location api] turns up some promising leads, I've just never used any of them. Maybe hostip.info?
The Geoloqi API may also be able to help you, it's a cool product, but now that ESRI has bought the company who knows what its future is.
posted by Nelson at 9:08 AM on November 24, 2012
« Older How to get good good looking skin for men?... | Find Me A Birthday Venue and Theme In Portland, OR Newer »
This thread is closed to new comments.
posted by empath at 10:59 AM on November 23, 2012