leaflet.extras icon indicating copy to clipboard operation
leaflet.extras copied to clipboard

wish: leaflet.RotatedMarker

Open rickyars opened this issue 8 years ago • 3 comments
trafficstars

Plugin for leaflet that enables rotation of marker icons in Leaflet: https://github.com/bbecquet/Leaflet.RotatedMarker

rickyars avatar Apr 05 '17 03:04 rickyars

The latest leaflet has rotateIcon support for awesomeIcons. https://github.com/rstudio/leaflet/blob/master/R/plugin-awesomeMarkers.R#L131 Will that work ?

bhaskarvk avatar Apr 05 '17 13:04 bhaskarvk

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.

rickyars avatar Apr 05 '17 14:04 rickyars

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.

bhaskarvk avatar Jul 19 '17 17:07 bhaskarvk