Note that there are some explanatory texts on larger screens.

plurals
  1. PORender google maps link as polyline
    primarykey
    data
    text
    <p>I want to display a couple of routes on a map, but I would prefer to first draw them with google maps. For example, I got directions from Seattle to San Diego, then moved things a bit, and the link looks like <a href="http://maps.google.com/maps?f=d&amp;source=s_d&amp;saddr=1521%20NW%2054th%20St,%20Seattle,%20WA%2098107&amp;daddr=42.488302,-124.541016%20to:San%20Diego,%20CA&amp;hl=en&amp;geocode=FT9a1wIdC6u0-Cnv7UVayBWQVDHcoty0jw_cIQ%3B%3BFUEy8wEdeVIE-SlLHpKtD1PZgDF53xX9_SE6DQ&amp;mra=dpe&amp;mrcr=0&amp;mrsp=1&amp;sz=5&amp;via=1&amp;dirflg=w&amp;sll=40.19161,-119.767455&amp;sspn=17.573252,39.506836&amp;ie=UTF8&amp;ll=41.14557,-113.24707&amp;spn=17.324253,39.506836&amp;z=5" rel="nofollow noreferrer">this</a>.</p> <p>I know that I can use the DirectionsRenderer to draw a polyline connecting Seattle and San Diego like this:</p> <pre><code> function renderDirections(result) { var directionsRenderer = new google.maps.DirectionsRenderer; directionsRenderer.setMap(gMap); directionsRenderer.setDirections(result); } var directionsService = new google.maps.DirectionsService; function requestDirections(start, end) { directionsService.route({ origin: start, destination: end, travelMode: google.maps.DirectionsTravelMode.BICYCLING }, function(result) { renderDirections(result); }); } requestDirections('Seattle, WA', 'San Diego, CA'); </code></pre> <p>What I would like to know is if there is a way to pass in the link as the directions request. The link contains waypoints, my modifications to the default route. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload