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

Loading…
Cancel
Save