fhgrthgtrh

google.maps.event.addDomListener(window, 'load', init); var map; function init() { var mapOptions = { center: new google.maps.LatLng(42.347179,-82.069599), zoom: 6, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.DEFAULT, }, disableDoubleClickZoom: true, mapTypeControl: false, scaleControl: true, scrollwheel: true, panControl: false, streetViewControl: false, draggable : true, overviewMapControl: true, overviewMapControlOptions: { opened: false, }, mapTypeId: google.maps.MapTypeId.TERRAIN, styles: [{"featureType":"landscape","stylers":[{"saturation":-100},{"lightness":65},{"visibility":"on"}]},{"featureType":"poi","stylers":[{"saturation":-100},{"lightness":51},{"visibility":"simplified"}]},{"featureType":"road.highway","stylers":[{"saturation":-100},{"visibility":"off"}]},{"featureType":"road.arterial","stylers":[{"saturation":-100},{"lightness":30},{"visibility":"off"}]},{"featureType":"road.local","stylers":[{"saturation":-100},{"lightness":40},{"visibility":"off"}]},{"featureType":"transit","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"administrative.province","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":-25},{"saturation":-100}]},{"featureType":"water","elementType":"geometry","stylers":[{"hue":"#ffff00"},{"lightness":-25},{"saturation":-97}]}], } var mapElement = document.getElementById('fischer'); var map = new google.maps.Map(mapElement, mapOptions); var locations = [ ['New York City', 'undefined', 'undefined', 'undefined', 'undefined', 40.7127837, -74.00594130000002, 'https://mapbuildr.com/assets/img/markers/ellipse-black.png'],['Albany', 'undefined', 'undefined', 'undefined', 'undefined', 42.6525793, -73.7562317, 'https://mapbuildr.com/assets/img/markers/ellipse-black.png'],['Buffalo', 'undefined', 'undefined', 'undefined', 'undefined', 42.88644679999999, -78.8783689, 'https://mapbuildr.com/assets/img/markers/ellipse-black.png'],['Detroit', 'undefined', 'undefined', 'undefined', 'undefined', 42.331427, -83.0457538, 'https://mapbuildr.com/assets/img/markers/ellipse-black.png'],['New Buffalo', 'undefined', 'undefined', 'undefined', 'undefined', 41.7939302, -86.74391539999999, 'https://mapbuildr.com/assets/img/markers/ellipse-black.png'],['Chicago', 'undefined', 'undefined', 'undefined', 'undefined', 41.8781136, -87.62979819999998, 'https://mapbuildr.com/assets/img/markers/ellipse-black.png'],['La Salle', 'undefined', 'undefined', 'undefined', 'undefined', 41.3621503, -89.0418249, 'https://mapbuildr.com/assets/img/markers/ellipse-black.png'],['Davenport', 'undefined', 'undefined', 'undefined', 'undefined', 41.5236437, -90.57763669999997, 'https://mapbuildr.com/assets/img/markers/ellipse-black.png'] ]; for (i = 0; i < locations.length; i++) { if (locations[i][1] =='undefined'){ description ='';} else { description = locations[i][1];} if (locations[i][2] =='undefined'){ telephone ='';} else { telephone = locations[i][2];} if (locations[i][3] =='undefined'){ email ='';} else { email = locations[i][3];} if (locations[i][4] =='undefined'){ web ='';} else { web = locations[i][4];} if (locations[i][7] =='undefined'){ markericon ='';} else { markericon = locations[i][7];} marker = new google.maps.Marker({ icon: markericon, position: new google.maps.LatLng(locations[i][5], locations[i][6]), map: map, title: locations[i][0], desc: description, tel: telephone, email: email, web: web }); link = ''; } var waypts = []; directionsService = new google.maps.DirectionsService(); directionsDisplay = new google.maps.DirectionsRenderer({ suppressMarkers: true }); if (locations.length > 1){ for (var i = 0; i < locations.length; i++) { waypts.push({ location:new google.maps.LatLng(locations[i][5], locations[i][6]), stopover:true }); }; var request = { origin: new google.maps.LatLng(locations[0][5], locations[0][6]), destination: new google.maps.LatLng(locations[locations.length - 1][5], locations[locations.length - 1][6]), waypoints: waypts, optimizeWaypoints: true, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { polylineOptions = { strokeColor: '#808080', strokeWeight: '3' } directionsDisplay.setOptions({ polylineOptions: polylineOptions }); directionsDisplay.setDirections(response); } }); directionsDisplay.setMap(map); } } #fischer { height:600px; width:1000px; } .gm-style-iw * { display: block; width: 100%; } .gm-style-iw h4, .gm-style-iw p { margin: 0; padding: 0; } .gm-style-iw a { color: #4272db; }