@@ -2,7 +2,7 @@ leafletMeasureDependencies <- function() {
2
2
list (
3
3
htmltools :: htmlDependency(
4
4
" leaflet-measure" ,
5
- " 1. 2.0" ,
5
+ " 2.0.2 " ,
6
6
system.file(" htmlwidgets/lib/leaflet-measure" , package = " leaflet" ),
7
7
script = " leaflet-measure.min.js" ,
8
8
stylesheet = " leaflet-measure.css"
@@ -29,6 +29,16 @@ leafletMeasureDependencies <- function() {
29
29
# ' @param popupOptions \code{list} of ptions applied to the popup
30
30
# ' of the resulting measure feature.
31
31
# ' Properties may be any \href{http://leafletjs.com/reference.html#popup-options}{standard Leaflet popup options}.
32
+ # ' @param captureZIndex Z-index of the marker used to capture measure clicks.
33
+ # ' Set this value higher than the z-index of all other map layers to
34
+ # ' disable click events on other layers while a measurement is active.
35
+ # ' @param localization Locale to translate displayed text.
36
+ # ' Available locales include en (default), cn, de, es, fr, it, nl, pt,
37
+ # ' pt_BR, pt_PT, ru, and tr
38
+ # ' @param decPoint Decimal point used when displaying measurements.
39
+ # ' If not specified, values are defined by the localization.
40
+ # ' @param thousandsSep Thousands separator used when displaying measurements.
41
+ # ' If not specified, values are defined by the localization.
32
42
# '
33
43
# ' @return modified map
34
44
# ' @examples
@@ -49,6 +59,7 @@ leafletMeasureDependencies <- function() {
49
59
# ' , primaryAreaUnit = "sqmeters"
50
60
# ' , activeColor = "#3D535D"
51
61
# ' , completedColor = "#7D4479"
62
+ # ' , localization = 'de'
52
63
# ' )
53
64
# '
54
65
# ' @export
@@ -62,6 +73,10 @@ addMeasure <- function(
62
73
, activeColor = " #ABE67E"
63
74
, completedColor = " #C8F2BE"
64
75
, popupOptions = list ( className = ' leaflet-measure-resultpopup' , autoPanPadding = c(10 ,10 ) )
76
+ , captureZIndex = 10000
77
+ , localization = ' en'
78
+ , decPoint = ' .'
79
+ , thousandsSep = ' ,'
65
80
) {
66
81
map $ dependencies <- c(map $ dependencies , leafletMeasureDependencies())
67
82
invokeMethod(
@@ -79,6 +94,10 @@ addMeasure <- function(
79
94
, activeColor = activeColor
80
95
, completedColor = completedColor
81
96
, popupOptions = popupOptions
97
+ , captureZIndex = captureZIndex
98
+ , localization = localization
99
+ , decPoint = decPoint
100
+ , thousandsSep = thousandsSep
82
101
)
83
102
)
84
103
)
0 commit comments