Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
111 lines (95 sloc) 4.23 KB
<!DOCTYPE html>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script async src=""></script>
<script src="gtag.js"></script>
<script src=""></script>
<link rel="stylesheet" href="">
<link href="" rel="stylesheet">
<link href="" rel="stylesheet">
<!-- JS file -->
<script src=""></script>
<script type='text/javascript' src="js/api-keys.js"></script>
<script src="" crossorigin="anonymous"></script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- CSS file -->
<link rel="stylesheet"
<!-- Additional CSS Themes file - not required-->
<link rel="stylesheet"
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Simple Polylines</title>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
/* Optional: Makes the sample page fill the window. */
body {
height: 100%;
margin: 0;
padding: 0;
<div id="map"></div>
// This example creates a 2-pixel-wide red polyline showing the path of
// the first trans-Pacific flight between Oakland, CA, and Brisbane,
// Australia which was made by Charles Kingsford Smith.
function initMap() {
var google_api = my_api_keys.GOOGLE_API_KEY;
var cumtd_api = my_api_keys.CUMTD_API_KEY;
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
vars[key] = value;
var dict = []; // create an empty array
function (data) {
for (j in data.shapes) {
var d = {
lat: data.shapes[j].shape_pt_lat,
lng: data.shapes[j].shape_pt_lon
dict[j] = d
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 13,
center: dict[Math.floor(dict.length / 2)],
mapTypeId: 'terrain'
var busPath = new google.maps.Polyline({
path: dict,
geodesic: true,
strokeColor: `#${vars['color']}`,
strokeOpacity: .9,
strokeWeight: 6
<script async defer