var latLng = new google.maps.LatLng(48.7758, 9.1829);
var homeLatLng = new google.maps.LatLng(48.7758, 9.1829);
var map = new google.maps.Map(document.getElementById("map_canvas"), {
@ -43,26 +79,51 @@
@@ -43,26 +79,51 @@
center: latLng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
});
let myData;
marker = new markerWithLabel.MarkerWithLabel({
position: homeLatLng,
map: map,
draggable: true,
raiseOnDrag: true,
labelContent: "A",
labelAnchor: new google.maps.Point(-6, -35),
labelClass: "labels", // the CSS class for the label
labelInBackground: false,
});
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: new google.maps.LatLng(d.lonLat[1], d.lonLat[0]),
map: map,
draggable: true,
raiseOnDrag: true,
labelContent: "A",
labelAnchor: new google.maps.Point(-6, -35),
labelClass: "labels", // the CSS class for the label
labelInBackground: false,
});
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>",
});
google.maps.event.addListener(marker, "click", function (e) {
<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) {