const routePoints = [ { lat: 52.499098, lng: 9.8566258 }, { lat: 52.4993876, lng: 9.856243 }, { lat: 52.4996268, lng: 9.8560721 }, { lat: 52.5001629, lng: 9.8561070 }, { lat: 52.5005209, lng: 9.8561781 } ];
function initMap() {
const map = new google.maps.Map( document.getElementById("map"), { zoom: 15, center: routePoints[0], mapTypeId: "roadmap" } );
const routeLine = new google.maps.Polyline({ path: routePoints, geodesic: true, strokeColor: "#ff0000", strokeOpacity: 1.0, strokeWeight: 4 });
routeLine.setMap(map);
const bounds = new google.maps.LatLngBounds();
routePoints.forEach(point => { bounds.extend(point); });
map.fitBounds(bounds); }