diff --git a/mapper/src/App.css b/mapper/src/App.css index 15bc75a..9c4e580 100644 --- a/mapper/src/App.css +++ b/mapper/src/App.css @@ -229,3 +229,17 @@ h2 { .submenu button.active { background-color: #4a4a4a; } + +.loading-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + z-index: 10000; + display: flex; + justify-content: center; + align-items: center; + color: white; +} diff --git a/mapper/src/App.js b/mapper/src/App.js index efcd9b4..b4d5892 100644 --- a/mapper/src/App.js +++ b/mapper/src/App.js @@ -266,39 +266,14 @@ function Map({data, loading, end, duration, slider, mapState, setMapState, setSu setDrawnItems(items => items.filter(item => !deletedIds.includes(item.id))); }; + const showMap = Array.isArray(data); + return (
Loading...
- : - coords.length ? - ( -Loading...
+ ) : ( <>No data
> - } + ) + ) : ( +Loading...
+