mapboxer icon indicating copy to clipboard operation
mapboxer copied to clipboard

geolocate

Open bonushenricus opened this issue 3 years ago • 1 comments

Hello is it possible to use geolocateControl of mapbox?

bonushenricus avatar Jun 30 '21 21:06 bonushenricus

Hi @bonushenricus, yes this is possible with the generic add_control function:

mapboxer() %>%
   add_control("GeolocateControl", trackUserLocation = TRUE)

# More options
mapboxer() %>%
  add_control(
    "GeolocateControl",
    trackUserLocation = TRUE,
    positionOptions = list(enableHighAccuracy = TRUE)
  )

crazycapivara avatar Jul 02 '21 06:07 crazycapivara