-
Notifications
You must be signed in to change notification settings - Fork 655
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
assigned L.geoJson to var geojsonLayer for ability to resetStyle on mous... #317
Conversation
…ouseout see http://leafletjs.com/examples/choropleth.html for example usage. especially used in line 51 of example10.R
|
||
// mouseout to resetHighlight | ||
mouseout: function (e) { | ||
geojsonLayer.resetStyle(e.target); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to assign L.geoJson to a variable in order to resetStyle
Thanks Ben. This looks terrific. Can you make the pull request to the dev branch of rCharts, since most development has been taking place on the dev branch? I plan to sync the two branches over the holidays. |
…d javascript variable as the geoJson spec.features otherwise takes way to long to round trip between R and javascript. Added Shiny example app leaflet_chloropleth.
Hi Ramnath, Thanks for your quick response. Here's another hacky tweak I did (added html_sub argument to renderMap) in order to preload a geojson variable and use that as the geoJson spec.features (by running a substitution from I'm guessing there's a better way to handle this and open to suggestions. I'm happy to add this or an alternative option to the dev branch as well. Thanks again! |
That looks excellent! Let me take a closer look and then merge. Going forward I might be splitting rCharts into smaller packages. I am thinking of having an Thanks again for providing very useful suggestions and implementing them. |
Yes, will happily contribute, however you'd like to proceed. |
in order to repeat a copy of the data layers when panning outside initial globe extent (< -180, > 180). see all options at http://leafletjs.com/reference.html#map-options
assigned L.geoJson to var geojsonLayer for ability to resetStyle on mous...
Hi Ramanth,
Fantastic work with rCharts! Here's a very minor suggested tweak to your charts.R to enable mouseout style resetting similar to http://leafletjs.com/examples/choropleth.html, as demonstrated in line 51 of added example10.R. Hope this makes sense.
Thanks for your great work, Ben