20.04.2022, 20:28
Leider nicht, da das über mein Localhost läuft. Im prinzip schaut das so aus:
marker.addListener( 'click', function() {
pre = "";
var shortform = "";
getContentFetchAPI(marker.name,CreateCarousselIMGs_InfoWindow)
infoWindow.open( map, marker );
console.log(marker.name)
console.log(marker.id)
console.log(marker.type)
if (marker.type == "topTown"){
pre = "B"
}
else if (marker.type == "Town"){
pre = "B"
}
else{
pre = "A"
}
shortform = String(pre) + "-" + String(marker.id)
console.log(shortform)
btn = document.getElementById("addto")
btn.addListener( 'click', function() {
...
})
beim 2 addListener komme immer der Fehler
marker.addListener( 'click', function() {
pre = "";
var shortform = "";
getContentFetchAPI(marker.name,CreateCarousselIMGs_InfoWindow)
infoWindow.open( map, marker );
console.log(marker.name)
console.log(marker.id)
console.log(marker.type)
if (marker.type == "topTown"){
pre = "B"
}
else if (marker.type == "Town"){
pre = "B"
}
else{
pre = "A"
}
shortform = String(pre) + "-" + String(marker.id)
console.log(shortform)
btn = document.getElementById("addto")
btn.addListener( 'click', function() {
...
})
beim 2 addListener komme immer der Fehler