I\'m learning to program in R with the leaflet package. I want to give an angle to the icons, and am trying it with this code:
m <- leaflet()
m <- ad
For your first point, I've found that you can load your image if it's stored in a directory named www.
|
|- app.R
|- www
|- icon_plane.pg
Then you'll be able to load it with this piece of code
onRender("function(el, x) {
var planeIcon = L.icon({iconUrl: 'icon_plane.png', iconAnchor:[16, 16]});
var pathPattern = L.marker([34.45, 127.07], {icon: planeIcon, rotationAngle: 90}).addTo(this);
}")
Becareful of loading correctly your js file. I spent a lot of time looking why my image wasn't showing and finally it was only because my script wasn't in the correct place.