var latLng = new google.maps.LatLng(48.7758, 9.1829);
var homeLatLng = 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"), {
var map = new google.maps.Map(document.getElementById("map_canvas"), {
@ -43,26 +79,51 @@
center: latLng,
center: latLng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeId: google.maps.MapTypeId.ROADMAP,
});
});
let myData;
marker = new markerWithLabel.MarkerWithLabel({
async function getData() {
position: homeLatLng,
fetch("./Mouse-Over Yaml.yaml")
map: map,
.then((response) => response.text())
draggable: true,
.then((yamlString) => jsyaml.load(yamlString))
raiseOnDrag: true,
.then((data) => {
labelContent: "A",
console.log("data=", data);
labelAnchor: new google.maps.Point(-6, -35),
myData = data;
labelClass: "labels", // the CSS class for the label
myData.destinations.forEach((d) => {
labelInBackground: false,
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({
var iw = new google.maps.InfoWindow({
content: "<b>BRIK Coworking</b><br> \
content:
<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>",
'<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) {