Files
nodeMap/components/uiWidgets/CoordinateInput.js
ISA a19bf96843 fix(ui): Dropdown in MapLayersControlPanel zeigt jetzt Stationen/Bereiche korrekt an
- Zugriff auf GisStationsStaticDistrict.Points korrigiert
- Verhindert leere Dropdown-Liste bei gültigen Daten
- Neue Markdown-Dokus für UI-Komponenten erstellt (MapLayersControlPanel, EditModeToggle, VersionInfoModal, CoordinateInput)
- Version auf 1.1.190 gesetzt
2025-05-27 14:12:01 +02:00

25 lines
836 B
JavaScript

// /components/uiWidgets/CoordinateInput.js
import React, { useState } from "react";
const CoordinateInput = ({ onCoordinatesSubmit }) => {
const [coordinates, setCoordinates] = useState("");
const handleSubmit = (e) => {
e.preventDefault();
if (onCoordinatesSubmit) {
onCoordinatesSubmit(coordinates);
}
};
return (
<form onSubmit={handleSubmit} className="fixed top-5 left-5 z-50 bg-white shadow-lg rounded-lg p-4 w-72">
<input type="text" placeholder="Koordinaten eingeben (lat,lng)" value={coordinates} onChange={(e) => setCoordinates(e.target.value)} className="border p-2 rounded w-full mb-2" />
<button type="submit" className="bg-blue-500 text-white p-2 rounded w-full hover:bg-blue-600">
Zu Marker zoomen
</button>
</form>
);
};
export default CoordinateInput;