diff --git a/R/map_layer_h3.R b/R/map_layer_h3.R index b5a92501..c2a30920 100644 --- a/R/map_layer_h3.R +++ b/R/map_layer_h3.R @@ -102,7 +102,6 @@ add_h3 <- function( legend_format = NULL, update_view = TRUE, focus_layer = FALSE, - digits = 6, transitions = NULL ) { @@ -146,11 +145,6 @@ add_h3 <- function( l[["data"]] <- NULL } - # if( !is.null(l[["bbox"]] ) ) { - # bbox <- l[["bbox"]] - # l[["bbox"]] <- NULL - # } - checkHexAlpha(highlight_colour) layer_id <- layerId(layer_id, "h3") @@ -162,9 +156,11 @@ add_h3 <- function( jsfunc <- "add_h3_hexagon_geo" geometry_column <- "hexagon" + + ## use 'polyline' method because we have strings (cells), not lat/lon coordinates shape <- rcpp_point_polyline( data, l, geometry_column, "h3_hexagon") - #return(shape) + # return(shape) jsfunc <- "add_h3_hexagon" diff --git a/src/point.cpp b/src/point.cpp index f91689d7..8e149ece 100644 --- a/src/point.cpp +++ b/src/point.cpp @@ -56,7 +56,7 @@ Rcpp::StringVector get_point_legend_colours( std::string layer_name ) { Rcpp::StringVector point_legend; - if( layer_name == "column" || layer_name == "scatterplot" ) { + if( layer_name == "column" || layer_name == "scatterplot" || layer_name == "h3_hexagon") { point_legend = mapdeck::layer_colours::fill_stroke_legend; } else if ( layer_name == "pointcloud" ) { point_legend = mapdeck::layer_colours::fill_legend;