View source: R/core-near-point.R
near_point | R Documentation |
Finds places that are within a given radius of a specified location. The returned places contain basic data such as name, category and location.
near_point(
x,
y,
radius = 1000,
search_text = NULL,
category_id = NULL,
icon = NULL,
token = arc_token()
)
x |
The x coordinate, or longitude, to search from, in WGS84 decimal degrees. |
y |
The y coordinate, or latitude, to search from, in WGS84 decimal degrees. |
radius |
Default |
search_text |
Default |
category_id |
Default |
icon |
Default |
token |
an object of class |
An sf
object with columns
place_id
: The unique Id of this place. The ID can be passed to place_details()
to retrieve additional details.
name
: The name of the place, or point of interest. You can search for places by name using the searchText property
distance
: A double vector of the distance, in meters, from the place to the search point.
categories
: A data.frame
with two columns category_id
and label
. Categories are uniquely identified by a categoryId. For example, 17119
identifies a "Bicycle Store" and 10051
identifies a "Stadium". Note that a single place can belong to multiple categories (for example, a petrol station could also have a super-market).
icon
: A character vector of the URL for an icon for this place or category in either svg, cim or png format.
geometry
: an sfc_POINT
object in EPSG:4326
## Not run:
near_point(-117.194769, 34.057289)
near_point(139.75, 35.66)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.