Skip to content

Commit 2e8ec3e

Browse files
committed
going to CRAN
1 parent fda944d commit 2e8ec3e

File tree

6 files changed

+29
-23
lines changed

6 files changed

+29
-23
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: mapdeck
22
Type: Package
33
Title: Interactive Maps Using 'Mapbox GL JS' and 'Deck.gl'
44
Version: 0.3.0
5-
Date: 2020-03-18
5+
Date: 2020-03-22
66
Authors@R: c(
77
person("David", "Cooley", ,"dcooley@symbolix.com.au", role = c("aut", "cre"))
88
)

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* `add_arc` gets `tilt` and `height` arguments
2929
* `add_arc` gets `brush_radius` argument for brushing
3030
* opacity values can be in [0,1) OR [0,255]
31-
* layeres work without an access token
31+
* layers work without an access token
3232
* `add_title()` for adding titles to map
3333
* `add_scatterplot` gets `stroke_colour` and `stroke_width` arguments
3434
* `add_hexagon` gets transitions

R/map_layer_mesh.R

+9-9
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ find_mesh_index <- function( data ) {
3333
#' @inheritSection add_arc id
3434
#'
3535
#' @examples
36+
#' \donttest{
3637
#'
37-
#' x <- structure(list(vb = structure(c(0, 0, 0, 1, 100, 0, 0, 1, 0,
38-
#' -42, 0, 1), .Dim = 4:3), it = structure(1:3, .Dim = c(3L, 1L)),
39-
#' material = list(), normals = NULL, texcoords = NULL, meshColor = "vertices"),
40-
#' class = c("mesh3d", "shape3d"))
38+
#' ## exaggerate the elevation slightly
39+
#' m <- melbourne_mesh
40+
#' m$vb[3, ] <- m$vb[3, ] * 50
4141
#'
42-
#' set_token("MAPBOX_API_TOKEN")
42+
#'mapdeck() %>%
43+
#' add_mesh(
44+
#' data = m
45+
#' )
4346
#'
44-
#' mapdeck() %>%
45-
#' add_mesh(
46-
#' data = x
47-
#' )
47+
#' }
4848
#'
4949
#' @details
5050
#'

cran-comments.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
* updated to correctly link to geojsonsf and spatialwidget
55
* various updates to functions
66

7+
## Tests
8+
9+
* rhub - check for cran
10+
* rhub - check with sanitizers

man/add_mesh.Rd

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mesh.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ Rcpp::List mesh_to_sf( Rcpp::List& mesh, Rcpp::StringVector vertices ) {
9999

100100
// [[Rcpp::export]]
101101
Rcpp::List rcpp_mesh_geojson(
102-
Rcpp::List mesh, Rcpp::List params,
103-
Rcpp::StringVector vertices, int digits
102+
Rcpp::List mesh,
103+
Rcpp::List params,
104+
Rcpp::StringVector vertices,
105+
int digits
104106
) {
105107

106108
Rcpp::DataFrame data = mesh_to_sf( mesh, vertices );
@@ -112,7 +114,7 @@ Rcpp::List rcpp_mesh_geojson(
112114

113115
int data_rows = data.nrows();
114116

115-
std::string geometry_columns = "geometry";
117+
Rcpp::StringVector geometry_columns({"geometry"});
116118

117119
Rcpp::List lst_defaults = mesh_defaults( data_rows ); // initialise with defaults
118120
std::unordered_map< std::string, std::string > mesh_colours = mapdeck::layer_colours::fill_colours;

0 commit comments

Comments
 (0)