Viktoriia 1 месяц назад
Родитель
Сommit
7cff880d1e

+ 2 - 2
src/screens/InAppScreens/MapScreen/MarkerItem/index.tsx

@@ -82,7 +82,7 @@ const MarkerItem = ({
                     </Text>
                   </View>
                 ) : (
-                  <Text style={styles.calloutButtonText}>Mark Completed</Text>
+                  <Text style={styles.calloutButtonText}>To Complete</Text>
                 )}
               </TouchableOpacity>
 
@@ -165,7 +165,7 @@ const MarkerItem = ({
                     </Text>
                   </View>
                 ) : (
-                  <Text style={styles.calloutButtonText}>Mark Completed</Text>
+                  <Text style={styles.calloutButtonText}>To Complete</Text>
                 )}
               </TouchableOpacity>
 

+ 6 - 2
src/screens/InAppScreens/MapScreen/index.tsx

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