historyOptions {leaflet.extras2} | R Documentation |
History Options
Description
History Options
Usage
historyOptions(
position = c("topright", "topleft", "bottomleft", "bottomright"),
maxMovesToSave = 10,
backImage = "fa fa-caret-left",
forwardImage = "fa fa-caret-right",
backText = "",
forwardText = "",
backTooltip = "Go to Previous Extent",
forwardTooltip = "Go to Next Extent",
backImageBeforeText = TRUE,
forwardImageBeforeText = FALSE,
orientation = c("horizontal", "vertical"),
shouldSaveMoveInHistory = NULL
)
Arguments
position |
Set the position of the History control. Default is
|
maxMovesToSave |
Number of moves in the history to save before clearing out the oldest. Default value is 10, use 0 or a negative number to make unlimited. |
backImage |
The class for the 'back' button icon. Default is
|
forwardImage |
The class for the 'forward' button icon. Default is
|
backText |
The text in the buttons. Default is ”. |
forwardText |
The text in the buttons. Default is ”. |
backTooltip |
Tooltip content. Default is |
forwardTooltip |
Tooltip content. Default is |
backImageBeforeText |
When both text and image are present, whether to
show the image first or the text first (left to right). Default is
|
forwardImageBeforeText |
When both text and image are present, whether
to show the image first or the text first (left to right). Default is
|
orientation |
Whether to position the buttons on top of one another or
side-by-side. Default is |
shouldSaveMoveInHistory |
A JS callback you can provide that gets called with every move. return false to not save a move. |
Value
A list of further options for addHistory
References
https://github.com/cscott530/leaflet-history
See Also
Other History Functions:
addHistory()
,
clearFuture()
,
clearHistory()
,
goBackHistory()
,
goForwardHistory()
Examples
library(leaflet)
leaflet() %>%
addTiles() %>%
addHistory(options = historyOptions(position = "bottomright",
maxMovesToSave = 20,
backText = "Go back",
forwardText = "Go forward",
orientation = "vertical"
))