huge Laravel 10 upgrade

This commit is contained in:
HolgerHatGarKeineNode
2023-02-19 20:13:20 +01:00
parent 5c74f77beb
commit 12847f95f6
440 changed files with 46336 additions and 682 deletions

View File

@@ -0,0 +1,44 @@
import {openUrl} from './helper';
import {dispatchEventMarkerClicked} from './dispatchEvent';
export function createMarker(service, element, map, markerData) {
const {title, lat, lng, url, popup, icon, iconSize, iconAnchor} = markerData;
const markerOptions = {
title,
keyboard: false,
draggable: false,
};
if (icon) {
const iconOptions = {
iconUrl: icon,
};
if (iconSize) {
iconOptions.iconSize = iconSize;
}
if (iconAnchor) {
iconOptions.iconAnchor = iconAnchor;
}
markerOptions.icon = window.L.icon(iconOptions);
}
const marker = window.L.marker([lat, lng], markerOptions);
marker.on('click', event => {
event.originalEvent.preventDefault();
dispatchEventMarkerClicked(service, element, map, marker);
if (popup) {
window.L.popup()
.setLatLng([lat, lng])
.setContent(popup)
.openOn(map);
} else if (url) {
openUrl(url);
}
});
marker.addTo(map);
return marker;
}