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,
types = NULL,
country = NULL,
worldview = NULL,
width = "100%"
)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."
A vector of feature types to limit to which the search should be
limited. Available options include 'country', 'region', 'postcode',
'district', 'place', 'locality', 'neighborhood', 'address', 'street', 'block', 'address'. and 'secondary_address'. If left blank, all types will be searched.
A character string or vector of ISO 3166 alpha-2 country codes within which you would like to limit your search.
Returns features intended for different regional or cultural groups. The US ('us') world view is returned by default.
The width of the input field. Can be specified as a number (pixels) or a valid CSS width value (e.g., "300px", "100%"). Defaults to 100%.