Open theshteves opened 9 years ago
HTML:
<iframe width="100%" height="450" frameborder="0" style="border:0;" allowfullscreen></iframe>
JAVASCRIPT:
//on event
var requrl= "https://www.google.com/maps/embed/v1/directions"
+ "?key=AIzaSyCBYtphSiDRCkgJdo9y3IomkqL2ZjEi1Oc"
+ "&origin=" + // origin, comma-seperated lat-long
+ "&waypoints=" + // middle-points, comma-seperated lat-longs, seperated by pipes(" | ")
+ "&destination=" + ; // destination, comma-seperated lat-long
document.getElementsByTagName("iframe")[0].setAttribute("src", requrl);
obviously the src tag needs to have everything in one string. I need Newton to use his angular magic to formulaic offload all of the lat-long points into the src url.