Station in neue tab öffnen, in Kontextmenü

This commit is contained in:
ISA
2024-07-12 10:50:21 +02:00
parent c793e1c81c
commit b3af793a21

View File

@@ -1,4 +1,5 @@
// contextMenuUtils.js // contextMenuUtils.js
import { BASE_URL } from "../config/urls";
export function addContextMenuToMarker(marker) { export function addContextMenuToMarker(marker) {
marker.unbindContextMenu(); // Entferne das Kontextmenü, um Duplikate zu vermeiden marker.unbindContextMenu(); // Entferne das Kontextmenü, um Duplikate zu vermeiden
@@ -21,6 +22,7 @@ export function addContextMenuToMarker(marker) {
} }
// Funktion zum Öffnen in einem neuen Tab // Funktion zum Öffnen in einem neuen Tab
export function openInNewTab(e, marker) { export function openInNewTab(e, marker) {
const baseUrl = BASE_URL;
if (marker && marker.options && marker.options.link) { if (marker && marker.options && marker.options.link) {
//console.log("Marker data:", baseUrl + marker.options.link); //console.log("Marker data:", baseUrl + marker.options.link);
window.open(baseUrl + marker.options.link, "_blank"); window.open(baseUrl + marker.options.link, "_blank");