diff --git a/R/featureLayers.R b/R/featureLayers.R index 00bacf4..dbad7d6 100644 --- a/R/featureLayers.R +++ b/R/featureLayers.R @@ -128,16 +128,16 @@ featureLayerOptions <- function( #' "Heritage_Trees_Portland/FeatureServer/0"), #' useServiceSymbology = TRUE, #' labelProperty = "COMMON_NAM", labelOptions = labelOptions(textsize = "12px"), -#' popupProperty = JS(" -#' function(feature) { -#' return L.Util.template( -#' \"

{COMMON_NAM}


-#'

This tree is located at {ADDRESS} and its scientific name is {SCIENTIFIC}.

-#' \", -#' feature.properties -#' ); -#' }" -#' )) +#' popupProperty = JS(paste0( +#' "function(feature) {", +#' " return L.Util.template(", +#' " \"

{COMMON_NAM}


", +#' "

This tree is located at {ADDRESS} and its scientific name is {SCIENTIFIC}.

", +#' " \",", +#' " feature.properties", +#' " );", +#' "}" +#' ))) #' #' ## for more examples see #' # browseURL(system.file("examples/featureLayers.R", package = "leaflet.esri")) diff --git a/man/addEsriFeatureLayer.Rd b/man/addEsriFeatureLayer.Rd index 4011742..ea732aa 100644 --- a/man/addEsriFeatureLayer.Rd +++ b/man/addEsriFeatureLayer.Rd @@ -105,16 +105,16 @@ leaflet() \%>\% "Heritage_Trees_Portland/FeatureServer/0"), useServiceSymbology = TRUE, labelProperty = "COMMON_NAM", labelOptions = labelOptions(textsize = "12px"), - popupProperty = JS(" - function(feature) { - return L.Util.template( - \\"

{COMMON_NAM}


-

This tree is located at {ADDRESS} and its scientific name is {SCIENTIFIC}.

- \\", - feature.properties - ); - }" - )) + popupProperty = JS(paste0( + "function(feature) {", + " return L.Util.template(", + " \\"

{COMMON_NAM}


", + "

This tree is located at {ADDRESS} and its scientific name is {SCIENTIFIC}.

", + " \\",", + " feature.properties", + " );", + "}" + ))) ## for more examples see # browseURL(system.file("examples/featureLayers.R", package = "leaflet.esri"))