Skip to content

Instantly share code, notes, and snippets.

@goz
Created April 7, 2011 19:13
Show Gist options
  • Save goz/908473 to your computer and use it in GitHub Desktop.
Save goz/908473 to your computer and use it in GitHub Desktop.
navigation without GPS using ruby
require 'json'
require 'httparty'
cell_towers = [{:location_area_code => '10001',
:mobile_network_code => '01',
:cell_id => '4390',
:mobile_country_code => '501'}]
param = {
:cell_towers => cell_towers,
:version => '1.1.0',
:request_address => 'true'
}
response = HTTParty.post("https://www.google.com/loc/json",
:body => param.to_json,
:header => {"Content-Type" => "application/jsonrequest"})
puts response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment