class Gmaps::Client
- Gmaps::Client
- Reference
- Object
Included Modules
Defined in:
gmaps/client.crConstant Summary
-
Log =
::Log.for("geo_client")
Constructors
Instance Method Summary
- #api_key : String
- #extract_hospitals(json_result : String) : Array(Hospital)
- #find_nearest_hospitals(lat : Float64, long : Float64) : Array(Hospital)
- #find_nearest_hospitals(location : Gmaps::Locatable)
- #generate_directions_response(origin_lat : Float64, origin_long : Float64, dest_lat : Float64, dest_long : Float64) : HTTP::Client::Response
- #generate_directions_response(origin : Gmaps::LatLon, destination : Gmaps::Hospital) : HTTP::Client::Response
-
#get_nearest_hospitals_as_json(lat : Float64, long : Float64, radius : Float64 = 50000.0) : HTTP::Client::Response
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=40.56908,-116.92226&radius=5000&types=hospital&key=AIzaSyC4P-wFp5NJkICEG7gD6QpHF6Kf4IKgHko
- #http_client : HTTP::Client
Instance methods inherited from module Gmaps::GeoFuncs
calculate_distance(lat1 : Float64, long1 : Float64, lat2 : Float64, long2 : Float64) : Float64
calculate_distance,
to_radians(degrees : Float64) : Float64
to_radians
Constructor Detail
Instance Method Detail
def generate_directions_response(origin_lat : Float64, origin_long : Float64, dest_lat : Float64, dest_long : Float64) : HTTP::Client::Response
#
def generate_directions_response(origin : Gmaps::LatLon, destination : Gmaps::Hospital) : HTTP::Client::Response
#
def get_nearest_hospitals_as_json(lat : Float64, long : Float64, radius : Float64 = 50000.0) : HTTP::Client::Response
#
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=40.56908,-116.92226&radius=5000&types=hospital&key=AIzaSyC4P-wFp5NJkICEG7gD6QpHF6Kf4IKgHko