-
Notifications
You must be signed in to change notification settings - Fork 353
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
Hide itinerary instructions #20
Comments
Hi, in case you still need this, I added the functionality now with the methods |
Great ! Thanks man, keep up this amazing work ! |
Hello, I need quit the text instructions, but, when I use hide(), it only minimize in a little square, I think this function should be called minimize(), and hide() function should quit (not be visible) the text instructions. |
Hi @DiegoJohan, I think you're right. I'll consider renaming in a future version. In the meantime, you can work around this by adding this CSS rule: .leaflet-control-container .leaflet-routing-container-hide {
display: none;
} |
Hi, thanks for response, that's exactly what I did. greetings DIEGO JOHAN DELGADO HUERTAS 2015-08-21 1:26 GMT-05:00 Per Liedman notifications@github.com:
|
@perliedman could you please show an example of how to use |
@web2style hi! The Typically, you have an instance of
Hope this helps! |
@perliedman Yes, it did. Thanks a lot! |
@perliedman it doesn't throw an error, but it doesn't take any effect either. For example |
Check this example to see how it's supposed to work: http://playground-leaflet.rhcloud.com/guh/edit?html,output As mentioned in another issue you posted in, you can also use the Leaflet map's |
@perliedman Thanks for this. Could you please show an example of how to use |
@web2style sure, just call:
|
@perliedman Thank you! |
Hi @perliedman Will the feature about distinguishing |
@yuchenglin I've added it to the 4.0 wish list, but since I'm not actively working on LRM for the moment, the release date might be pretty far into the future. |
@perliedman Thank you! Look forward to the release. |
Hey! Is it possible to set a title for the button when the cart is hidden? Thanks! |
@sylvainar I guess this is possible by overriding the css for |
@perliedman I am trying to use the routing plugin in Shiny, and hide the itineray text but show the route. The control.hide() doesn't work in my case, and the removeControl works (but there's no route on the map). Could you show me how to hide the itineray but keep the route? |
@JiyingWen when you say " As mentioned in the discussion above, the method name .leaflet-control-container .leaflet-routing-container-hide {
display: none;
} |
Hi @perliedman, Thanks a lot for your reply! I'm trying to use leaflet-routing-machine plugin in Shiny, a few days it works and I was working on hiding(or remove) the itinerary text from the map. However, I ran the same code today, the route it not showing...but the waypoints are still there Here's the my code
|
@JiyingWen hm, sorry, I'm not fluent in R / Shiny, so I have a hard time understanding exactly what's going on here. My first thing to check is that you actually get a reply from the routing server. It looks like you're using OSRM's demo server (the default in Leaflet Routing Machine), and it has hiccups every now and then (it's free, so it comes without guarantees). Typically you would see some HTTP error in a debug console or similar. Otherwise, as far as I can tell the JavaScript parts above look like they should work. |
@perliedman Thanks a lot for your help! Now I can confirm it should be the server problem, as it works again today! :) |
@JiyingWen good to hear. Depending on your use case, you might want to consider setting up your own OSRM server to get more reliability, or use a service provider. For example Mapbox's directions API uses OSRM, and is compatible with Leaflet Routing Machine. |
Hi @perliedman, Edit: and more specifically, is there a way to not even request the intructions from the osrm server? |
@byrnedo to hide completely, follow the suggestions with CSS rules posted above. You can exclude instructions from OSRM, but there's no option to control this behavior from LRM's side at the moment. |
Missed that the css part was necessary. Worked like a charm. Ok, good to know. |
hi |
this is probably stupid but im coding in react and i dont know how to apply thos css rules to disable instructions or where to apply im confused |
Please don't comment into issues that are already closed @CodingReaper1. Chances are people won't read them and you won't get a reply. This was already answered here. How you import your CSS depends on your bundler of choice. React mostly uses webpack as far as I know, so your best bet would be to add a loader for CSS like css-loader or style-loader |
Please don't comment into issues that are already closed @SamNag. Chances are people won't read them and you won't get a reply. This was already answered #20 (comment). If the solution laid out there doesn't work, we would need more details such as
|
Hi,
I'm currently trying to put a route map on my website. I want to display the road, but not the text instructions without modifying the CSS (like display; none on .leaflet-routing-alt).
Is there a solution for doing that ? I've searched but I didn't manage to find a solution.
Thanks !
The text was updated successfully, but these errors were encountered: