walkerke / mapgl

R interface to Mapbox GL JS v3 and Maplibre GL JS
https://walker-data.com/mapgl
Other
91 stars 5 forks source link

variable sized icons/circles/markers #27

Closed ews-grmunjal closed 4 months ago

ews-grmunjal commented 4 months ago

Hi Kyle,

is it possible already or in the roadmap to be able to pass a list or vector of sizes for circles/symbols/markers?

To clarify my question:

I'm able to color circles by a continuous variable like so:

add_circle_layer( id = "elevation", source = data_sf, circle_radius = 5, circle_color = interpolate( column = "Elevation_m", values = c(min(data$Elevation_m), max(data$Elevation_m)), stops = c("#FFF7FB", "#023858") ), circle_opacity = 1 )

I would also like to be able to pass variable sizes to radius here for example

ews-grmunjal commented 4 months ago

to answer my own question: I needed step_expr or interpolate