tests/testthat/test-map_data.R

context("map_data")

test_that("lon & lat columns are found", {

  ## TODO
	## sf/sfencoded/sfencodedlite objects are not affected

	df <- mapdeck::capitals

	expect_true( mapdeck:::find_lon_column(names(df)) == "lon" )
	expect_true( mapdeck:::find_lat_column(names(df)) == "lat" )

	l <- mapdeck:::resolve_data( df, list(), "POINT" )
	expect_true( l[["lon"]] == "lon" )
	expect_true( l[["lat"]] == "lat" )

})

Try the mapdeck package in your browser

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

mapdeck documentation built on Sept. 4, 2020, 9:07 a.m.