Class: Mapbox::Geocoder
- Inherits:
-
Object
- Object
- Mapbox::Geocoder
- Includes:
- APIOperations::Request
- Defined in:
- lib/mapbox/geocoder.rb
Class Method Summary collapse
- .geocode_forward(query, proximity = nil, dataset = 'mapbox.places') ⇒ Object
- .geocode_reverse(location, dataset = 'mapbox.places') ⇒ Object
Methods included from APIOperations::Request
Class Method Details
.geocode_forward(query, proximity = nil, dataset = 'mapbox.places') ⇒ Object
7 8 9 10 11 12 |
# File 'lib/mapbox/geocoder.rb', line 7 def self.geocode_forward(query, proximity=nil, dataset='mapbox.places') return request( :get, "/v4/geocode/#{dataset}/#{URI.escape(query)}.json", nil) end |
.geocode_reverse(location, dataset = 'mapbox.places') ⇒ Object
14 15 16 17 18 19 |
# File 'lib/mapbox/geocoder.rb', line 14 def self.geocode_reverse(location, dataset='mapbox.places') return request( :get, "/v4/geocode/#{dataset}/#{location["longitude"]},#{location["latitude"]}.json", nil) end |