tests/testthat/test-leafgl-addGlPolylines.R

context("test-leafgl-addGlPolylines")

test_that("addGlPolylines works", {
  library(leaflet)
  library(leafgl)
  library(sf)

  storms = st_as_sf(atlStorms2005)

  m = leaflet() %>%
    addGlPolylines(data = suppressWarnings(st_cast(storms, "LINESTRING")),
                   group = "pls", digits = 5)

  expect_is(m, "leaflet")
})

Try the leafgl package in your browser

Any scripts or data that you put into this service are public.

leafgl documentation built on July 2, 2020, 4:02 a.m.