diff options
Diffstat (limited to 'modern/src/map/main/MapAccuracy.js')
-rw-r--r-- | modern/src/map/main/MapAccuracy.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modern/src/map/main/MapAccuracy.js b/modern/src/map/main/MapAccuracy.js index 335be58e..cdc706cc 100644 --- a/modern/src/map/main/MapAccuracy.js +++ b/modern/src/map/main/MapAccuracy.js @@ -42,13 +42,12 @@ const MapAccuracy = ({ positions }) => { }, []); useEffect(() => { - const data = { + map.getSource(id)?.setData({ type: 'FeatureCollection', features: positions .filter((position) => position.accuracy > 0) .map((position) => circle([position.longitude, position.latitude], position.accuracy * 0.001)), - }; - map.getSource(id).setData(data); + }); }, [positions]); return null; |