Update templates/map.html
Browse files- templates/map.html +6 -5
templates/map.html
CHANGED
|
@@ -202,9 +202,9 @@
|
|
| 202 |
parsedData.y,
|
| 203 |
parsedData.z,
|
| 204 |
parsedData.timestamp,
|
| 205 |
-
parsedData.playername || "Unnamed Player",
|
| 206 |
parsedData.preview || false,
|
| 207 |
-
parsedData.actualmap ||
|
|
|
|
| 208 |
parsedData.markercolor || false
|
| 209 |
);
|
| 210 |
}
|
|
@@ -1020,16 +1020,15 @@
|
|
| 1020 |
};
|
| 1021 |
|
| 1022 |
// Funktion zum Hinzufügen eines Markers
|
| 1023 |
-
function addMarker(x, y, z, timestamp, preview
|
| 1024 |
|
| 1025 |
-
const playerMarkerName = playername.toLowerCase().replaceAll(" ", "-")
|
| 1026 |
-
|
| 1027 |
// Validate position
|
| 1028 |
const position = {
|
| 1029 |
x: parseFloat(x),
|
| 1030 |
y: parseFloat(y),
|
| 1031 |
z: parseFloat(z)
|
| 1032 |
};
|
|
|
|
| 1033 |
if (!positionIsInBounds(position)) {
|
| 1034 |
console.error("Position außerhalb der Karte:", position);
|
| 1035 |
return;
|
|
@@ -1056,6 +1055,8 @@
|
|
| 1056 |
iconAnchor: [16, 32],
|
| 1057 |
popupAnchor: [0, -32]
|
| 1058 |
});
|
|
|
|
|
|
|
| 1059 |
|
| 1060 |
// Remove old marker for this player, if it exists
|
| 1061 |
if (playerMarkers[playerMarkerName]) {
|
|
|
|
| 202 |
parsedData.y,
|
| 203 |
parsedData.z,
|
| 204 |
parsedData.timestamp,
|
|
|
|
| 205 |
parsedData.preview || false,
|
| 206 |
+
parsedData.actualmap || "Unbekannte Map",
|
| 207 |
+
parsedData.playername || "Unnamed Player",
|
| 208 |
parsedData.markercolor || false
|
| 209 |
);
|
| 210 |
}
|
|
|
|
| 1020 |
};
|
| 1021 |
|
| 1022 |
// Funktion zum Hinzufügen eines Markers
|
| 1023 |
+
function addMarker(x, y, z, timestamp, preview, actualmap, playername, markercolor) {
|
| 1024 |
|
|
|
|
|
|
|
| 1025 |
// Validate position
|
| 1026 |
const position = {
|
| 1027 |
x: parseFloat(x),
|
| 1028 |
y: parseFloat(y),
|
| 1029 |
z: parseFloat(z)
|
| 1030 |
};
|
| 1031 |
+
|
| 1032 |
if (!positionIsInBounds(position)) {
|
| 1033 |
console.error("Position außerhalb der Karte:", position);
|
| 1034 |
return;
|
|
|
|
| 1055 |
iconAnchor: [16, 32],
|
| 1056 |
popupAnchor: [0, -32]
|
| 1057 |
});
|
| 1058 |
+
|
| 1059 |
+
const playerMarkerName = playername.toLowerCase().replaceAll(" ", "-")
|
| 1060 |
|
| 1061 |
// Remove old marker for this player, if it exists
|
| 1062 |
if (playerMarkers[playerMarkerName]) {
|