geoCoder hinter dataSheet ausblenden
This commit is contained in:
15
cypress/e2e/mapInteraction.cy.js
Normal file
15
cypress/e2e/mapInteraction.cy.js
Normal file
@@ -0,0 +1,15 @@
|
||||
describe("Karteninteraktion", () => {
|
||||
it("zoomt zu den eingegebenen Koordinaten", () => {
|
||||
cy.visit("/map"); // Passe den Pfad an deine Karte an
|
||||
cy.get('input[placeholder="Koordinaten eingeben (lat,lng)"]').type("52.52,13.405");
|
||||
cy.get("button").contains("Zu Marker zoomen").click();
|
||||
|
||||
// Überprüfe, ob die Karte die Koordinaten korrekt zentriert hat
|
||||
cy.window().then((win) => {
|
||||
const map = win.map; // Zugriff auf die Leaflet-Instanz
|
||||
const center = map.getCenter();
|
||||
expect(center.lat).to.be.closeTo(52.52, 0.01);
|
||||
expect(center.lng).to.be.closeTo(13.405, 0.01);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -71,7 +71,7 @@ export const initializeMap = (mapRef, setMap, setOms, setMenuItemAdded, addItems
|
||||
}).addTo(initMap);
|
||||
|
||||
// Suchfeld hinzufügen
|
||||
const geocoder = L.Control.geocoder({
|
||||
/* const geocoder = L.Control.geocoder({
|
||||
defaultMarkGeocode: false,
|
||||
})
|
||||
.on("markgeocode", function (e) {
|
||||
@@ -79,7 +79,7 @@ export const initializeMap = (mapRef, setMap, setOms, setMenuItemAdded, addItems
|
||||
initMap.setView(latlng, 15);
|
||||
L.marker(latlng).addTo(initMap).bindPopup(e.geocode.name).openPopup();
|
||||
})
|
||||
.addTo(initMap);
|
||||
.addTo(initMap); */
|
||||
|
||||
// Initialisiere OverlappingMarkerSpiderfier
|
||||
const overlappingMarkerSpiderfier = new OverlappingMarkerSpiderfier(initMap, {
|
||||
|
||||
Reference in New Issue
Block a user