query_tiles.Rd
Get information about features in a tileset using the Tilequery API
query_tiles(
location,
tileset_id,
radius = 0,
limit = 5,
dedupe = TRUE,
geometry = NULL,
layers = NULL,
access_token = NULL
)
The location for which you'd like to query tiles, expressed as either a length-2 vector of longitude and latitude or an address you'd like to geocode.
The tileset ID to query.
The radius around the point (in meters) for which you'd like to query features. For point-in-polygon queries (e.g. "what county is my point located in?") the default of 0 should be used.
How many features to return (defaults to 5). Can be an integer between 1 and 50.
Whether or not to return duplicate features as identified by their IDs. The default, TRUE, will de-duplicate your dataset.
The feature geometry type to query - can be "point"
,
"linestring"
, or "polygon"
. If left blank, all geometry types
will be queried.
A vector of layer IDs you'd like to query (recommended); if left blank will query all layers, with the limitation that at most 50 features can be returned.
A Mapbox access token, which can be set with
mb_access_token()
.
An R list containing the API response, which includes information about the requested features. Parse the list to extract desired elements.