Node-RED WORLDMAP: Drawing routes/paths based on the coordinates

#1

Hi,

Are there suggestions of anyone who has worked on an api that can help plot routes/paths(shortest etc.) on a worldmap/ openstreetmap using set of two or three geo coordinates?

Thank you in advance!

Best Regards,
Muhammad Rohan Ali Asmat

0 Likes

#2

Not sure what you are trying to do ? The tracks node (part of worldmap) can add a track to any point that gets updated. You can also draw lines if you read the readme.

0 Likes

#3

Hi,

Many thanks for suggestion.
What I mean is that if we have two or three coordinates with start and end point can we get the shortest route?
Even better if we get according to the modes of transport!

0 Likes

#4

The shortest route will be a straight line (or actually the Great Circle line) between the two points.

Are you actually asking that it should understand road layouts and work out the best way to (for example) drive from A to B? If so then the answer is no. You will have to use the likes of Google Navigation for that.

1 Like

#5

Yes, I meant that!

For example, I was looking for if anyone has integrated OSRM are is implementing osrm node!

0 Likes

#6

Not that I know of - but I would look here for plugins that would help - https://leafletjs.com/plugins.html#routing
As (for example) the Routing Machine one is over 500k compressed I'm not about to add it by default but it wouldn't be too hard to do I would hope.

1 Like

#7

Thanks for the pointers!

0 Likes