Browse Source

Fixing bug in data filter when inserting new values

master
GabrielTrettel 3 years ago
parent
commit
e0793e32af
  1. 5
      src/app/components/map/OpenStreetMap.js

5
src/app/components/map/OpenStreetMap.js

@ -77,9 +77,10 @@ export default function OpenStreetMap({
// }); // });
useEffect(() => { useEffect(() => {
if (markersList && mapRef && notEmpy(markersList)) {
if (markersList && mapRef) {
deleteAllMarkers(mapRef); deleteAllMarkers(mapRef);
notEmpy(markersList) &&
markersList.forEach((val, k) => { markersList.forEach((val, k) => {
insertMarker(mapRef, val[1].ID, val[1].coordinate, val[1].image); insertMarker(mapRef, val[1].ID, val[1].coordinate, val[1].image);
}); });
@ -111,7 +112,7 @@ export default function OpenStreetMap({
<MapModal <MapModal
showModal={markerListener} showModal={markerListener}
setShowModal={setMarkerListener} setShowModal={setMarkerListener}
markers={markers.markers}
markers={markersList}
/> />
<MapDataMenu <MapDataMenu

Loading…
Cancel
Save