Depict a path on Google Maps with a Line

Hi, How to add a line to depict a path on Google Maps?

Something like this:-

Do you want to make the line yourself? Something like i did here?

2 Likes

You could also use this extension

1 Like

I was just looking at these posts…

However Thanks @Peter

But Those are polygons but I need Lines To show routes in Google maps.

Somewhat Like this in OSM:-

And Like This On Google Maps:-

Ignore the traffic and the walking distance (Depicted In Dotted Lines).

I use polylines for that purpose, to show my routes.
But if i understand you correctly you want to do the same in Google Maps as what is possible with your extension in Open Streetmap.

I think in Google Maps, if you want to do it the same way as OpenRouteservice does you have to pay. But maybe i am wrong.

1 Like

Only If I use the Google Directions API Then I have To pay. Or just have to attach a billing account to use the free tier.

But What If I use Open Route Service Instead of the Google Directions API then?

That’s Ok @Peter, but my question is How To put a line in Google Maps?

What is the purpose of the line. Is it just as in my app a static route. Or do you want to be able to choose two point and have a route in between?

Then i guess you have to use the javascript api in a webviewer.

It is just a static route between 2 points.

But the points change in your app when used by a user?

1 Like

Yeah, That will change as per user location and and database.

#off topic
You can only post videos in English language !!!
Rules are rules …

2 Likes

Yes you are right. removed them.

1 Like

Please don’t do that !!
I understand the point of view…
it’s just to help the question !!!

I found the block you were talking about. Isn’t it this one?

component_method

I will test this block with my Navigation Extension Then I will update it here.

How did you get the routes?

1 Like

I got It How To do that
See it Here:

2 Likes