|
|
@@ -1498,8 +1498,12 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
const { features } = event;
|
|
|
|
|
|
if (features?.length) {
|
|
|
- if (features.length > 1) {
|
|
|
- const markers = features
|
|
|
+ const uniqueFeatures = features
|
|
|
+ ? Array.from(new Map(features.map((f: any) => [f.properties.id, f])).values())
|
|
|
+ : [];
|
|
|
+
|
|
|
+ if (uniqueFeatures.length > 1) {
|
|
|
+ const markers = uniqueFeatures
|
|
|
.map((f: any) => {
|
|
|
const markerCoordinates = f.geometry.coordinates;
|
|
|
if (!markerCoordinates) return null;
|