var latLng = new google.maps.LatLng(48.7758, 9.1829);
var homeLatLng = new google.maps.LatLng(48.7758, 9.1829);
@ -43,9 +79,18 @@
@@ -43,9 +79,18 @@
center: latLng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
});
let myData;
async function getData() {
fetch("./Mouse-Over Yaml.yaml")
.then((response) => response.text())
.then((yamlString) => jsyaml.load(yamlString))
.then((data) => {
console.log("data=", data);
myData = data;
myData.destinations.forEach((d) => {
marker = new markerWithLabel.MarkerWithLabel({
position: homeLatLng,
position: new google.maps.LatLng(d.lonLat[1], d.lonLat[0]),
map: map,
draggable: true,
raiseOnDrag: true,
@ -56,13 +101,29 @@
@@ -56,13 +101,29 @@
});
var iw = new google.maps.InfoWindow({
content: "<b>BRIK Coworking</b><br> \
<ahref=\"https://soeren.cleverroute.net/?origin=Jesberg%2C%20Hessen&arrival=2022-04-29T10%3A00%3A00.000Z&destination=Stuttgart%2C%20Baden-W%C3%BCrttemberg\"> Fahrt finden mit cleverroute</a>",
content:
'<b>'+d.name+'</b><br> \
<ahref="https://soeren.cleverroute.net/?origin=Jesberg%2C%20Hessen&arrival=2022-04-29T10%3A00%3A00.000Z&destination=Stuttgart%2C%20Baden-W%C3%BCrttemberg"> Fahrt finden mit cleverroute</a>',
});
google.maps.event.addListener(marker, "click", function (e) {