walkerke / mapgl

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

styling for draw controls #33

Closed ews-grmunjal closed 1 day ago

ews-grmunjal commented 1 month ago

Hi Kyle, would it be possible to allow passing custom css for the draw control? or could you make an example (as your time allows) on how to do this?

I am able to change most things about the styling using just mapgl controls and passing new styles to them (see example below) but not able to change the layout and positioning....what i want is the toolbar horizontal and bottom-center.

Also, currently for me the default top_left works great but it goes under legends I may have on top_left.... all other positions seem to send the draw_control out of the map

image

walkerke commented 1 month ago

I don't know how to do that just yet - your styling looks really cool! I'm not seeing the same issue as you with the draw control being rendered out of the map.

walkerke commented 1 day ago

This is now possible thanks to the updates in Mapbox GL JS 3.7.0!

mapboxgl() |> add_draw_control(orientation = "horizontal", position = "bottom")

image