Class: Mapbox::Tilequery

Inherits:
Object
  • Object
show all
Extended by:
HashUtils
Includes:
APIOperations::Request
Defined in:
lib/mapbox/tilequery.rb

Class Method Summary collapse

Methods included from HashUtils

xy_from_hash

Methods included from APIOperations::Request

included

Class Method Details

.tilequery(mapid, location, radius, limit) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/mapbox/tilequery.rb', line 6

def self.tilequery(mapid, location, radius, limit)
  lon = location['longitude'].round(5)
  lat = location['latitude'].round(5)
  return request(
    :get,
    "/v4/#{mapid}/tilequery/#{lon},#{lat}.json?radius=#{radius}&limit=#{limit}",
    nil)
end