-
Notifications
You must be signed in to change notification settings - Fork 194
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
Plotting route using rMaps and leaflet routing machine plugin #45
Comments
Here is a short writeup on how to use the routing plugin with rMaps. |
The writeup was very helpful, especially to understand addAssets() and setTemplate()! Thank you very much! :) Not sure if I should ask my question here, but the route still does not show on the map. The "afterScript" was not added to the html source code. Could you help me please understand where I might be messing up? Thank you! |
Do you have the devtools::install_github("ramnathv/rCharts@dev") |
Ah okay. Another bug at my end. Just do this before you install the install.packages('base64enc') |
Thank you! This solved the issue! :-) |
You are welcome. Note that this feature is still an experimental one. So use it with caution, especially if you plan to use it in production. |
Thank you for the heads-up. I will be using it as part of a short demo. I will keep following your updates regarding this feature. I am enjoying learning these new R tools! |
Great. If you have feedback/comments, keep them coming. I always enjoy adding new features based on real use cases. |
Hi Ramnath, one more question: I am trying to wrap the visualization of the map using "shiny". I am including the code you have shared with me within a server.R file using the function output$map = renderMap({ And then in the ui.R file using the function mapOutput('map') But I only see the map without the route. Is there something I am missing to add the new script to show in the web app? Thank you!! |
There is a bug in |
One more incentive to do so, for sure. This will really work well with Shiny I'm using RStudio and clicking on map produces no browser-opening. Should I be doing something with the index.html file? |
Are you clicking the object named Making this work with Shiny is easy, but requires some architectural changes to |
"Click on the map to be taken to a full page interactive version, where you can see the routing directions as well" The map does appear in RStudioViewer but clicking on it does not propogate a browser with directions |
Got it. I will check what might be wrong with that. |
You have done an amazing job with the package rCharts! It is super useful. Having it work with shiny would be an awesome fix! I will be on the lookout for the updates! Thank you very much, Ramnath! |
Hi Ramnathv...Hope you fix map to work in Shiny |
I posted this answer on StackOverflow that uses the routing with shiny. Does this answer some of the questions here? |
Hi Ramnath, I have the same problem that when wrap the code into shiny, the map is there but the route is not showing. Could you help with that? Thanks! @ramnathv |
Hi @tospig I followed your way but the style is a bit off as you said..Is there a way to not show the text? or move the text to the side of the map? Thanks! |
@tospig Hi your method doesn't work as well....it worked yesterday....Thanks for any help! |
Hi @ramnathv , thanks a lot for such detailed writeup on your gist, it's really helpful! However, I met a problem but didn't find the solution, could you bring me some idea? |
Hi all!
I am new to using rMaps and leaflet. I would like to plot the route between two locations. The leaflet routing machine plugin allows us to do this (https://github.com/perliedman/leaflet-routing-machine). I am not quite sure how to use the functions addAssets() and setTemplate() to be able to use this plugin.
I have downloaded the "leaflet-routing-machine.min.js" file and saved in the same directory as my R code. I started playing a bit with the example that was given for rMaps. Here is my code so far:
I appreciate any help!! Thank you!
The text was updated successfully, but these errors were encountered: