|
@ -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 |
|
|