Files
DoEverythingBar/google/maps.js
T
Arjun Patel 15e450d0e0 maps
2017-10-07 17:40:52 -07:00

17 lines
694 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var mapsFrame = document.getElementById('map');
var searchBar = document.getElementById('search-cont');
function directionsURL(inCommand) {
var startOfTo = inCommand.indexOf("to");
var origin = inCommand.substring(0, startOfTo - 1).replace(" ", "+");
var dest = inCommand.substring(startOfTo+3).replace(" ", "+"); // "14872 Waverly Lane, Irvine, CA" to "14872 Waverly Lane+Irvine+CA"
var link = "https://www.google.com/maps/embed/v1/directions?key=AIzaSyCZCgZY7ZlSMk1DW0NEEoHZ9qwdSL4AR1k&origin="+origin+"&destination="+dest
mapsFrame.src = link;
mapsFrame.style.display = "block";
}
$(function() {
$('#search-cont').css({"-webkit-transform":"translate(100px,100px)"});
});