Skip to content

Commit

Permalink
cran
Browse files Browse the repository at this point in the history
  • Loading branch information
dcooley committed Jan 22, 2024
1 parent bc8f7ca commit 1aba222
Show file tree
Hide file tree
Showing 27 changed files with 87 additions and 450 deletions.
33 changes: 17 additions & 16 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: mapdeck
Type: Package
Title: Interactive Maps Using 'Mapbox GL JS' and 'Deck.gl'
Version: 0.3.40006
Date: 2024-01-04
Version: 0.3.5
Date: 2024-01-23
Authors@R: c(
person("David", "Cooley", ,"[email protected]", role = c("aut", "cre"))
)
Expand All @@ -16,17 +16,29 @@ BugReports: https://github.com/SymbolixAU/mapdeck/issues
Encoding: UTF-8
LazyData: true
Depends: R (>= 3.5.0)
SystemRequirements: C++14
Imports:
colourvalues (>= 0.3.8),
colourvalues (>= 0.3.9),
googlePolylines (>= 0.7.2),
geojsonsf (>= 1.3.3),
geojsonsf (>= 2.0.3),
htmlwidgets,
jsonify (>= 1.1.1),
jsonify (>= 1.2.2),
magrittr,
Rcpp (>= 1.0.10),
shiny,
sfheaders (>= 0.4.4)
RoxygenNote: 7.2.3
LinkingTo:
BH,
colourvalues (>= 0.3.9),
geojsonsf (>= 2.0.3),
geometries (>= 0.2.4),
interleave (>= 0.1.2),
jsonify (>= 1.2.2),
rapidjsonr,
Rcpp (>= 1.0.10),
sfheaders (>= 0.4.2),
spatialwidget (>= 0.2.5)
Suggests:
covr,
googleway,
Expand All @@ -36,17 +48,6 @@ Suggests:
spatialwidget,
testthat
VignetteBuilder: knitr
LinkingTo:
BH,
colourvalues (>= 0.3.8),
geojsonsf (>= 1.3.3),
geometries (>= 0.2.4),
interleave (>= 0.1.2),
jsonify (>= 1.1.1),
rapidjsonr,
Rcpp (>= 1.0.10),
sfheaders (>= 0.4.2),
spatialwidget (>= 0.2.5)
Remotes:
dcooley/geometries,
dcooley/interleave,
Expand Down
4 changes: 4 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@
#'
"city_trail"

#' road_safety
#'
#' A data.frame of counts of traffic accidents in the UK
"road_safety"
2 changes: 0 additions & 2 deletions R/map_layer_h3.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ add_h3 <- function(
## use 'polyline' method because we have strings (cells), not lat/lon coordinates
shape <- rcpp_point_polyline( data, l, geometry_column, "h3_hexagon")

# return(shape)

jsfunc <- "add_h3_hexagon"

light_settings <- jsonify::to_json(light_settings, unbox = T)
Expand Down
6 changes: 3 additions & 3 deletions R/map_layer_mesh.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ find_mesh_index <- function( data ) {
#' m <- melbourne_mesh
#' m$vb[3, ] <- m$vb[3, ] * 50
#'
#'mapdeck() %>%
#' mapdeck() %>%
#' add_mesh(
#' data = m
#' )
Expand Down Expand Up @@ -74,8 +74,8 @@ add_mesh <- function(
brush_radius = NULL
) {

if( nrow( data ) == 0 ) {
return( clear_mesh( map, layer_id, ... ) )
if( length( data ) == 0 ) {
return( clear_mesh( map = map, layer_id = layer_id, update_view = update_view, clear_legend = clear_legend ) )
}

experimental_layer( "mesh" )
Expand Down
2 changes: 1 addition & 1 deletion R/map_layer_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ mapdeckPathDependency <- function() {
#' , y = "y"
#' , linestring_id = "id"
#' , list_columns = "col"
#' , keep = T
#' , keep = TRUE
#' )
#'
#' mapdeck(
Expand Down
2 changes: 2 additions & 0 deletions R/map_layer_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ mapdeckScatterplotDependency <- function() {
#' small for the given zoom level
#' @param radius_max_pixels the maximum radius in pixels. Can prevent the circle from
#' getting too big when zoomed in
#' @param collision_filter set to `TRUE` if you want to hide features that overlap
#' other features. Default is `FALSE`
#'
#' @inheritSection add_polygon data
#' @inheritSection add_arc legend
Expand Down
2 changes: 1 addition & 1 deletion R/map_layer_terrain.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mapdeckTerrainDependency <- function() {
#'
#' @inheritParams add_arc
#' @param elevation_data Image URL that encodes height data. When \code{elevation_data}
#' is a URL template, i.e. a string containing '{x}' and '{y}', it loads terrain tiles on demand
#' is a URL template, i.e. a string containing `{x}` and `{y}`, it loads terrain tiles on demand
#' and renders a mesh for each tile. If \code{elevation_data} is an absolute URL, as ingle mesh is used,
#' and the \code{bounds} argument is required to position it into the world space.
#' @param texture Image URL to use as the texture
Expand Down
1 change: 0 additions & 1 deletion R/map_layer_trips.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ add_trips <- function(

#' @rdname clear
#' @export

clear_trips <- function( map, layer_id = NULL, update_view = TRUE, clear_legend = TRUE) {
layer_id <- layerId(layer_id, "trips")
## TRIPS needs to be stopped first
Expand Down
Loading

0 comments on commit 1aba222

Please sign in to comment.