From 13669490438843973ab04364a69f274e5d4d814f Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Tue, 28 Apr 2020 12:31:01 +0200 Subject: [PATCH] update Di 28. Apr 12:31:01 CEST 2020 --- public/js/client_rmld.js | 2 +- public/js/client_waip.js | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/public/js/client_rmld.js b/public/js/client_rmld.js index cd82950..473c27a 100755 --- a/public/js/client_rmld.js +++ b/public/js/client_rmld.js @@ -38,8 +38,8 @@ if (einsatzdaten_obj.wgs84_x && einsatzdaten_obj.wgs84_y) { map.setView(new L.LatLng(einsatzdaten_obj.wgs84_x, einsatzdaten_obj.wgs84_y), 13); } else { var geojson = L.geoJSON(JSON.parse(einsatzdaten_obj.wgs84_area)).addTo(map); - // map.fitBounds(geojson.getBounds()); + map.setZoom(13); }; /* ########################### */ diff --git a/public/js/client_waip.js b/public/js/client_waip.js index 6783348..39de0fb 100644 --- a/public/js/client_waip.js +++ b/public/js/client_waip.js @@ -397,8 +397,6 @@ socket.on('io.neuerEinsatz', function(data) { }; $('#em_weitere').html(tmp); }; - // Karte setzen - // Karte setzen map.removeLayer(marker); map.removeLayer(geojson); @@ -410,12 +408,9 @@ socket.on('io.neuerEinsatz', function(data) { } else { geojson = L.geoJSON(JSON.parse(data.wgs84_area)); geojson.addTo(map); - var bounds =geojson.getBounds(); - console.log(bounds); - console.log(map.fitBounds(bounds)); - }; - - + map.fitBounds(geojson.getBounds()); + map.setZoom(13); + }; // Hilfsfrist setzen start_counter(data.zeitstempel, data.ablaufzeit); // Uhr ausblenden