Skip to content

Commit d8157a8

Browse files
authored
Merge pull request #509 from olivroy/no-sp
Remove tests relying on leaflet datasets being sp objects
2 parents 3f53171 + 8a1e32e commit d8157a8

File tree

1 file changed

+2
-44
lines changed

1 file changed

+2
-44
lines changed

inst/tinytest/test-mapview.R

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -293,28 +293,7 @@ expect_true(inherits(map@map, "leaflet"))
293293
expect_equal(typeof(map@object), "list")
294294
expect_true(inherits(map@object[[1]], "SpatialPixelsDataFrame"))
295295

296-
### SpatialLines -----
297-
library(sp)
298-
library(leaflet)
299-
300-
## mapview
301-
map = mapview(as(atlStorms2005, "SpatialLines"))
302-
303-
expect_true(inherits(map, "mapview"))
304-
expect_true(inherits(map@map, "leaflet"))
305-
expect_equal(typeof(map@object), "list")
306-
expect_true(inherits(map@object[[1]], "sfc"))
307-
308-
## mapView
309-
map = mapView(as(atlStorms2005, "SpatialLines"))
310-
311-
expect_true(inherits(map, "mapview"))
312-
expect_true(inherits(map@map, "leaflet"))
313-
expect_equal(typeof(map@object), "list")
314-
expect_true(inherits(map@object[[1]], "sfc"))
315-
316-
### SpatialLinesDataFrame -----
317-
library(sp)
296+
### sf SFC_LINESTRING -----
318297
library(leaflet)
319298

320299
## mapview
@@ -333,28 +312,7 @@ expect_true(inherits(map@map, "leaflet"))
333312
expect_equal(typeof(map@object), "list")
334313
expect_true(inherits(map@object[[1]], "sfc"))
335314

336-
### SpatialPoints -----
337-
library(sp)
338-
library(leaflet)
339-
340-
## mapview
341-
map = mapview(as(breweries91, "SpatialPoints"))
342-
343-
expect_true(inherits(map, "mapview"))
344-
expect_true(inherits(map@map, "leaflet"))
345-
expect_equal(typeof(map@object), "list")
346-
expect_true(inherits(map@object[[1]], "sfc"))
347-
348-
## mapView
349-
map = mapView(as(breweries91, "SpatialPoints"))
350-
351-
expect_true(inherits(map, "mapview"))
352-
expect_true(inherits(map@map, "leaflet"))
353-
expect_equal(typeof(map@object), "list")
354-
expect_true(inherits(map@object[[1]], "sfc"))
355-
356-
### SpatialPointsDataFrame -----
357-
library(sp)
315+
### sf sfc_point -----
358316
library(leaflet)
359317

360318
## mapview

0 commit comments

Comments
 (0)