Skip to content

Instantly share code, notes, and snippets.

@spara
Created March 4, 2014 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spara/9355599 to your computer and use it in GitHub Desktop.
Save spara/9355599 to your computer and use it in GitHub Desktop.
ip2coordinates:
http://www.datasciencetoolkit.org/ip2coordinates/%2267.169.73.113%22?callback=jQuery191041297997487708926_1393966710310&_=1393966710311
returns:
jQuery191041297997487708926_1393966710310(
{
67.169.73.113: {
dma_code: 807,
latitude: 37.7587013244629,
country_code3: "USA",
area_code: 415,
longitude: -122.438102722168,
country_name: "United States",
postal_code: "94114",
region: "CA",
locality: "San Francisco",
country_code: "US"
}
}
)
street2coordinates: (wraps address in extra quotes):
http://www.datasciencetoolkit.org/street2coordinates/%222543%20Graystone%20Place%2C%20Simi%20Valley%2C%20CA%2093065%22?callback=jQuery191041297997487708926_1393966710308&_=1393966710309
returns:
jQuery191041297997487708926_1393966710308(
{
"2543 Graystone Place, Simi Valley, CA 93065": null
}
)
I call street2coordinates like this:
var addy = '2543 Graystone Place, Simi Valley, CA 93065'
var dstk = $.DSTK();
dstk.street2coordinates(addy, function(error, data, httpResponse) {
if (!error) {
console.log(data);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment