Method: Mapbox::Geocoder.geocode_reverse
- Defined in:
- lib/mapbox/geocoder.rb
.geocode_reverse(location, options = {}, dataset = 'mapbox.places') ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/mapbox/geocoder.rb', line 46 def self.geocode_reverse(location, ={}, dataset='mapbox.places') location[:longitude] = location[:longitude].round(5) location[:latitude] = location[:latitude].round(5) params = self.assemble_params() return request( :get, "/geocoding/v5/#{dataset}/#{xy_from_hash(location).join(',')}.json#{params}", nil) end |