Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
trafficonese committed Apr 2, 2024
2 parents 7d8f028 + a548b88 commit bd6b962
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
9 changes: 5 additions & 4 deletions R/webGLHeatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ addWebGLGeoJSONHeatmap <- function(
opacity = 1,
gradientTexture = NULL,
alphaRange = 1) {

map$dependencies <- c(map$dependencies,
omnivoreDependencies(),
webGLHeatmapDependency())
map$dependencies <- c(
map$dependencies,
omnivoreDependencies(),
webGLHeatmapDependency()
)

leaflet::invokeMethod(
map, leaflet::getMapData(map),
Expand Down
27 changes: 17 additions & 10 deletions tests/testthat/test-map-controls.R
Original file line number Diff line number Diff line change
Expand Up @@ -308,26 +308,33 @@ test_that("map-control-plugins", {


drawshape <- drawShapeOptions(
stroke = FALSE,color = "blue",weight = 3,opacity = 0.7,fill = FALSE,fillColor = "blue",fillOpacity = 0.2,
dashArray = c(10,16),lineCap = TRUE,lineJoin = TRUE,clickable = FALSE,pointerEvents = NULL,smoothFactor = 3, noClip = FALSE)
stroke = FALSE, color = "blue", weight = 3, opacity = 0.7, fill = FALSE, fillColor = "blue", fillOpacity = 0.2,
dashArray = c(10, 16), lineCap = TRUE, lineJoin = TRUE, clickable = FALSE, pointerEvents = NULL, smoothFactor = 3, noClip = FALSE
)
drawopts <- drawPolylineOptions(
allowIntersection = FALSE, drawError = list(color = "red", timeout = 200),
guidelineDistance = 500, maxGuideLineLength = 2000,
showLength = FALSE, metric = FALSE, feet = FALSE, nautic = TRUE,
zIndexOffset = 4000, shapeOptions = drawshape, repeatMode = TRUE)
zIndexOffset = 4000, shapeOptions = drawshape, repeatMode = TRUE
)
drawpolyg <- drawPolygonOptions(
showArea = TRUE, metric = FALSE, shapeOptions = drawshape, repeatMode = TRUE)
showArea = TRUE, metric = FALSE, shapeOptions = drawshape, repeatMode = TRUE
)
drawcircl <- drawCircleOptions(
showRadius = FALSE,metric = FALSE,feet = FALSE,nautic = TRUE,shapeOptions = drawshape,repeatMode = TRUE)
showRadius = FALSE, metric = FALSE, feet = FALSE, nautic = TRUE, shapeOptions = drawshape, repeatMode = TRUE
)
drawrect <- drawRectangleOptions(
showArea = FALSE,metric = FALSE,shapeOptions = drawshape,repeatMode = TRUE)
showArea = FALSE, metric = FALSE, shapeOptions = drawshape, repeatMode = TRUE
)
drawmark <- drawMarkerOptions(markerIcon = NULL, zIndexOffset = 4000, repeatMode = TRUE)
drawcirc <- drawCircleMarkerOptions(
stroke = TRUE,color = "blue",weight = 8,opacity = 1,fill = FALSE,fillColor = "red",
fillOpacity = 0.5,clickable = FALSE,zIndexOffset = 4000,repeatMode = TRUE)
stroke = TRUE, color = "blue", weight = 8, opacity = 1, fill = FALSE, fillColor = "red",
fillOpacity = 0.5, clickable = FALSE, zIndexOffset = 4000, repeatMode = TRUE
)
selpath <- selectedPathOptions(
dashArray = c("30, 40"),weight = 5,color = "orange",fill = FALSE,
fillColor = "yellow",fillOpacity = 0.9,maintainColor = TRUE)
dashArray = c("30, 40"), weight = 5, color = "orange", fill = FALSE,
fillColor = "yellow", fillOpacity = 0.9, maintainColor = TRUE
)
ts <- leaflet() %>%
setView(0, 0, 2) %>%
addProviderTiles(providers$CartoDB.Positron) %>%
Expand Down

0 comments on commit bd6b962

Please sign in to comment.