-
Notifications
You must be signed in to change notification settings - Fork 61
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
How to use events? #20
Comments
It looks like you're actually talking about the new version of the package, available at https://github.com/rstudio/leaflet. The functionality you're looking for isn't natural to do yet, but we're looking to add it pretty soon. However it's quite straightforward to do with the older version of the package available at this repo. Look in this example: https://github.com/jcheng5/leaflet-shiny/blob/master/inst/examples/population/server.R#L102 |
Hi Joe, I do agree with cho7tom: this is a fantastic package. I also would like to use the older version of leaflet and I believe you forgot to provide the corresponding repo. Also (I don't know if it is the right place to say that - if not I do apologize) the example at http://glimmer.rstudio.com/jcheng/leaflet-demo/ seems based on the older version and doesn't fully reflect the sources at https://github.com/jcheng5/leaflet-shiny/tree/master/inst/examples/population. In any case: still fantastic. Thanks! Best regards, EDIT: Ok, I see hinkelman already posted about this (issue #12) and that the example actually matches the code at https://github.com/jcheng5/leaflet-shiny/tree/polygon-example/inst/example, so don't mind me ;) |
In the population example, it is possible to remove existing markers (via map$clearMarker()). Is this function possible with the new rstudio/leaflet version? Thanks! |
Not yet, but we're intending to bring that functionality in over the coming weeks. |
Thanks! Look forward to seeing this functionality in rstudio/leaflet! |
When using renderPrint to output what is contained in "event", I get my latitude and longitude (and another column named "nonce" which is a value that ranges from 0 to 1 apparently) but no ID. How can I have an ID for each circleMarker that is displayed? Thank you! |
Pass a character vector for your `layerId` argument when calling
addCircleMarker.
|
Thank you Joe! |
Dear Joe,
First of all congratulation for your great package!
I have built a map with circle markers and popups, and I would like popups to appear when the mouse goes on a circle. I am not a js user, and I don't understand how I should use the events (if it's the correct concept to be invoked here) in my R code.
Could you please help me with this issue?
Thank you in advance and best regards,
Thomas
my code:
output$mapTweets <- renderLeaflet({
m = leaflet() %>% addTiles()
m
m %>% addCircleMarkers(lng = located_patient.tw$lon, lat = located_patient.tw$lat, popup = custom.popup, radius = 4, opacity = 0.2)
})
}
The text was updated successfully, but these errors were encountered: