0

I've been searching for a solution on a project that I'm currently working on:

There is place A and place B that a user can choose as needed be. These places will then be transferred to google maps embed via the following link:

https://www.google.com/maps/embed/v1/directions?key={$key}&origin={$origin}&destination={$destination}&avoid=tolls&mode=driving&waypoints=stopover:false|{$waypoints}"

Additionally, waypoints are added. What I want is that the directions is being displayed from place A to place B and the waypoints are shown on the map without being part of the actual route between place A and place B.

I've found the function "stopover:false" but that is not working as used above.

My question now: I don't want the waypoints to be part of the calculated route but it seems that is just working with the js version of google maps. Is that even possible? If yes, can I somehow tell the waypoints (without js) that stopover is supposed to be false?

I've looked into different topics such as: Several highlights in google maps embed API How to set waypoints in the googlemaps url Google MAPS waypoints

But I can't seem to find a answer for the embed api.

Thanks in advance!

Community
  • 1
  • 1

1 Answers1

0

If I understand this correctly, I think you need to add via: to each waypoint you don't want to be a stopover (and get rid of "stopover:false"). E.g.

https://www.google.com/maps/embed/v1/directions?origin=Boston,MA&destination=Concord,MA&waypoints=via:Charlestown,MA|via:Lexington,MA&key=

Rob
  • 226
  • 1
  • 5
  • It doesn't change the fact, that the waypoints are still included. Using the via: method is the same as if I would just leave it all together. The route is still being calculated with the waypoints. I'd rather have the waypoints as markers and not actual points on the route. But thanks for the answer! – Daniel Rakowski Jun 28 '17 at 13:57