Skip to content

Commit

Permalink
going to CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dcooley committed Mar 22, 2020
1 parent fda944d commit 2e8ec3e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: mapdeck
Type: Package
Title: Interactive Maps Using 'Mapbox GL JS' and 'Deck.gl'
Version: 0.3.0
Date: 2020-03-18
Date: 2020-03-22
Authors@R: c(
person("David", "Cooley", ,"[email protected]", role = c("aut", "cre"))
)
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* `add_arc` gets `tilt` and `height` arguments
* `add_arc` gets `brush_radius` argument for brushing
* opacity values can be in [0,1) OR [0,255]
* layeres work without an access token
* layers work without an access token
* `add_title()` for adding titles to map
* `add_scatterplot` gets `stroke_colour` and `stroke_width` arguments
* `add_hexagon` gets transitions
Expand Down
18 changes: 9 additions & 9 deletions R/map_layer_mesh.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ find_mesh_index <- function( data ) {
#' @inheritSection add_arc id
#'
#' @examples
#' \donttest{
#'
#' x <- structure(list(vb = structure(c(0, 0, 0, 1, 100, 0, 0, 1, 0,
#' -42, 0, 1), .Dim = 4:3), it = structure(1:3, .Dim = c(3L, 1L)),
#' material = list(), normals = NULL, texcoords = NULL, meshColor = "vertices"),
#' class = c("mesh3d", "shape3d"))
#' ## exaggerate the elevation slightly
#' m <- melbourne_mesh
#' m$vb[3, ] <- m$vb[3, ] * 50
#'
#' set_token("MAPBOX_API_TOKEN")
#'mapdeck() %>%
#' add_mesh(
#' data = m
#' )
#'
#' mapdeck() %>%
#' add_mesh(
#' data = x
#' )
#' }
#'
#' @details
#'
Expand Down
4 changes: 4 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
* updated to correctly link to geojsonsf and spatialwidget
* various updates to functions

## Tests

* rhub - check for cran
* rhub - check with sanitizers
18 changes: 9 additions & 9 deletions man/add_mesh.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ Rcpp::List mesh_to_sf( Rcpp::List& mesh, Rcpp::StringVector vertices ) {

// [[Rcpp::export]]
Rcpp::List rcpp_mesh_geojson(
Rcpp::List mesh, Rcpp::List params,
Rcpp::StringVector vertices, int digits
Rcpp::List mesh,
Rcpp::List params,
Rcpp::StringVector vertices,
int digits
) {

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

int data_rows = data.nrows();

std::string geometry_columns = "geometry";
Rcpp::StringVector geometry_columns({"geometry"});

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

0 comments on commit 2e8ec3e

Please sign in to comment.