mapElement = document.getElementById('map');
// Create the Google Map using our element and options defined above
map = new google.maps.Map(mapElement, mapOptions);
infowindow = new google.maps.InfoWindow();
// Let's also add a marker while we're at it
for (i = 0; i < locations.length; i++) {
var marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map,
// url: 'https://www.google.com/maps/dir/?api=1&destination='+locations[i][1], locations[i][2],
// title: locations[i][0],
icon: image
});
google.maps.event.addListener(marker, 'click', (function (marker, i) {
return function () {
infowindow.setContent(locations[i][0] + locations[i][3] + locations[i][4]);
infowindow.open(map, marker);
}
})(marker, i));
}
}
function NewLocation(Nlat, Nlng) {
this.map = map;
var latLng = new google.maps.LatLng(Nlat, Nlng);
map.setZoom(13);
map.panTo(latLng);
}
gyro.startTracking(function (o) {
var b = document.getElementById('examplea'),
f = document.getElementById('features');
f.innerHTML = gyro.getFeatures();
b.innerHTML = o.x + o.gamma;
});