Open rickyars opened 7 years ago
The latest leaflet has rotateIcon support for awesomeIcons. https://github.com/rstudio/leaflet/blob/master/R/plugin-awesomeMarkers.R#L131 Will that work ?
Hmmm, I guess I was too quick to reply. When you said leaflet I thought you meant the javascript library and not the R package. I tested out iconRotate and it does rotate the icon, not the teardrop. Is there any way to remove the teardrop from an awesome marker? I only want to see the icon - not the marker.
Yeah I think it should be possible with something like
addLabelOnlyMarkers(lat, lng, options=labelOptions(style="transform: rotate(90deg);"))
You may also need to add browser specific styles. See https://github.com/rstudio/leaflet/blob/master/inst/htmlwidgets/plugins/Leaflet.awesome-markers/leaflet.awesome-markers.js#L91 for how it's done.
Plugin for leaflet that enables rotation of marker icons in Leaflet: https://github.com/bbecquet/Leaflet.RotatedMarker