Use Mapbox's Geocoder widget in a Shiny application
mapboxGeocoderInput(
inputId,
access_token = NULL,
placeholder = "Search",
search_within = NULL,
proximity = NULL,
limit = 5,
min_length = 2,
language = NULL
)
A Mapbox geocoder widget as a Shiny input
The Shiny input ID
The Mapbox access token (required); can be set with
mb_access_token()
The placeholder to be used in the search box; defaults to 'Search'
An sf
object, or vector representing a bounding box of
format c(min_longitude, min_latitude, max_longitude, max_latitude)
used
to limit search results. Defaults to NULL.
A length-2 vector of longitude and latitude coordinates used to prioritize results near to that location. Defaults to NULL.
The maximum number of results to show. Defaults to 5.
The minimum number of characters the user must enter before results are shown. Defaults to 2.
The language to use for the geocoder. Per the Mapbox documentation, "Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script."