by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
gantamk
@gantamk
Hello
Hans Kristian Flaatten
@Starefossen
Hey @gantamk
Just ask here if you have any questions :)
gantamk
@gantamk
Hello Hans, Thanks for the fantastic library.
Can I create my custom route/road using this library and apply routing on that.
Your response is really appreciated.
Hans Kristian Flaatten
@Starefossen
Yes, you can definitely use this with your custom route/roads with this library. I would encourage you to look into pgRouting for this :)
gantamk
@gantamk
Thank you for the response.
can please help me to find out if there is any leaflet plugin to create pgRouting? something like this http://leaflet.github.io/Leaflet.draw/
greyes193
@greyes193
Hi
Need some help
greyes193
@greyes193
I'm starting to use the plugin for a webapp that I'm building, this app uses openstreetmaps and is for Venezuela, but I'm having a problem because when I try to draw a route over the highways with bridges, only takes the street that are below of it or near of it. Can anyone help me?
Hans Kristian Flaatten
@Starefossen
Hi @greyes193. I am the author of the leaflet-routing plugin. It sounds to me that this may be an issue with the routing service your are using underneath leaflet-routing. Are you using the OSM router?
greyes193
@greyes193
Hi! Thank you! Yes, I'm using the one that brings in the example because all this is really new to me and that looked really fine!
greyes193
@greyes193
The problem is with the OSM router? In that case, do you know another that I can use with your library?
Hans Kristian Flaatten
@Starefossen
I can check if I am able to reproduce the error, the leaflet-routing library depends on an underlying routing service.
I do not think there are any free routing services you can use as a drop in replacement.
greyes193
@greyes193
greyes193
@greyes193
I found the issue! Was everything ok, just that in the example (from where I took it), in the url of the OSR router there's the parameter v that is the type of transportation and was set in "foot", so there's no a foot route in that via.
Was almost hidden for me but that's it.
I'm so sorry for the trouble! and thank you for your response and the grate work with the plugin!
Hans Kristian Flaatten
@Starefossen
Oh, I did not know. Thanks for reporting back your fix. This might help others with similar problems :)
greyes193
@greyes193
Thanks to you! And I'm sorry for this but, where I can set an option to change the color of the routes? It is possible?
Hans Kristian Flaatten
@Starefossen
Yes, you can :)
var routing = new L.Routing({
  ...,
  styles: {
    trailer: {...}, 
    track: {...}, 
    nodata: {...}
  }
});
You can the various options you can pass in at http://leafletjs.com/reference.html#path
greyes193
@greyes193
In the section nodata?
Hans Kristian Flaatten
@Starefossen
nodata (as in no data) is the line when no route can be found between the two waypoints. I think you are most interested in modifying the track option which is the route retuned from the router.
My previous link was wrong. Here are the options you can set to the track option: http://leafletjs.com/reference.html#path
greyes193
@greyes193
Thanks again! I will work on that! :smile:
Hans Kristian Flaatten
@Starefossen
var routing = new L.Routing({
  ...,
  styles: {
    track: {
      color: '#1b1b1b',
      weight: 10,
      opacity: 0.8
    }, 
  }
});
Just something to get you started :)
greyes193
@greyes193
Thanks, but it's not working, now don't draw anything and say "Cannot read property 'opacity' of undefined"
I tried changing the order, and deleting the opacity, also with the snapping layer that is the first one to call Opacity but is still in the same error
gantamk
@gantamk
@gantamk
can please help me to find out if there is any leaflet (or anything else) plugin to create pgRouting? something like this http://leaflet.github.io/Leaflet.draw/
@greyes193
thinker03
@thinker03
do you have an offline leaflet routing engine?
Sebastian Sommer
@sosnet
would also need an offline routing engine for leaflet
Amine Assali
@AmineAssali
hello everyone i'm new here , i would like to knew if i can use Leaflet Routing Machine or note because they give me a msg such as (You are using OSRM's demo server. Please note that it is NOT SUITABLE FOR PRODUCTION USE...) , if not i would like to knew how to draw a path between two markers and get all points between them
thanks in advance ..