-
Notifications
You must be signed in to change notification settings - Fork 167
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
Different Markers #69
Comments
http://leafletplayback.theoutpost.io/examples/example_2.js
and then:
You can pass feature to the marker function and use the properties of the feature to style it as you want. |
Hi, I am using the R version of this plugin through the addPlayback() function in leaflet.extras2. Apologies this is not directly a js question, but I don't suppose you could help with altering the moveable marker icon and colours as above? E.g. I was expecting something like the below using htmlwidgets::JS but it is not working, and I am probably doing something wrong: leaflet() %>%
addTiles() %>%
addPlayback(data = data,
options = playbackOptions(
marker = htmlwidgets::JS(
"
function() {
return L.AwesomeMarkers(
{
prefix: 'fa',
icon: 'bullseye',
markerColor: 'darkgreen'
}
);
}
"
)
)) |
Hi @christhaxter, I'm not familiar with R at all, but is the above syntax correct? I saw this usage of the JS function: Also there is a difference in the return of your stringified function (returns the L.AwesomeMarkers object) and the one in the example (which returns an object with an Apart from that I can't really tell what the issue is, maybe start there ^. |
I am using the Example 2 but i dont understand where in the playbackOptions do we pass the different icons that we want to show in each route....
The text was updated successfully, but these errors were encountered: