소스 검색

clusters style small fix

Viktoriia 7 달 전
부모
커밋
e73aa4806f
1개의 변경된 파일26개의 추가작업 그리고 9개의 파일을 삭제
  1. 26 9
      src/screens/InAppScreens/MapScreen/index.tsx

+ 26 - 9
src/screens/InAppScreens/MapScreen/index.tsx

@@ -376,14 +376,14 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
 
   useEffect(() => {
     if (usersLocation) {
-    const filteredNomads: GeoJSON.FeatureCollection = {
-      type: 'FeatureCollection',
-      features: usersLocation.geojson.features.filter(
-        (feature: GeoJSON.Feature) => feature.properties?.id !== +userId
-      )
-    };
+      const filteredNomads: GeoJSON.FeatureCollection = {
+        type: 'FeatureCollection',
+        features: usersLocation.geojson.features.filter(
+          (feature: GeoJSON.Feature) => feature.properties?.id !== +userId
+        )
+      };
 
-    setNomads(filteredNomads);
+      setNomads(filteredNomads);
     }
   }, [usersLocation]);
 
@@ -1329,7 +1329,17 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
               filter={['has', 'point_count']}
               aboveLayerID={Platform.OS === 'android' ? 'place-continent' : undefined}
               style={{
-                circleRadius: ['step', ['get', 'point_count'], 15, 10, 20, 30, 25],
+                circleRadius: [
+                  'interpolate',
+                  ['linear'],
+                  ['get', 'point_count'],
+                  0, 15,
+                  10, 17,
+                  20, 19,
+                  50, 21,
+                  75, 23,
+                  100, 25
+                ],
                 circleColor: 'rgba(255, 126, 0, 1)',
                 circleStrokeWidth: 2,
                 circleStrokeColor: '#FFFFFF',
@@ -1343,7 +1353,14 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
               style={{
                 textField: ['get', 'point_count'],
                 textFont: ['Noto Sans Bold'],
-                textSize: 12,
+                textSize: [
+                  'interpolate',
+                  ['linear'],
+                  ['get', 'point_count'],
+                  0, 13,
+                  20, 14,
+                  75, 15
+                ],
                 textColor: '#FFFFFF',
                 textHaloColor: '#000000',
                 textHaloWidth: 1,