Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wish: leaflet.RotatedMarker #72

Open
rickyars opened this issue Apr 5, 2017 · 3 comments
Open

wish: leaflet.RotatedMarker #72

rickyars opened this issue Apr 5, 2017 · 3 comments

Comments

@rickyars
Copy link

rickyars commented Apr 5, 2017

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

@bhaskarvk
Copy link
Contributor

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

@rickyars
Copy link
Author

rickyars commented Apr 5, 2017

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.

@bhaskarvk
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants