|
@@ -85,6 +85,7 @@ import _ from 'lodash';
|
|
import ScaleBar from 'src/components/ScaleBar';
|
|
import ScaleBar from 'src/components/ScaleBar';
|
|
import MessagesDot from 'src/components/MessagesDot';
|
|
import MessagesDot from 'src/components/MessagesDot';
|
|
|
|
|
|
|
|
+const clusteredUsersIcon = require('assets/icons/icon-clustered-users.png');
|
|
const defaultUserAvatar = require('assets/icon-user-share-location-solid.png');
|
|
const defaultUserAvatar = require('assets/icon-user-share-location-solid.png');
|
|
const logo = require('assets/logo-ua.png');
|
|
const logo = require('assets/logo-ua.png');
|
|
const defaultSeriesIcon = require('assets/series-default.png');
|
|
const defaultSeriesIcon = require('assets/series-default.png');
|
|
@@ -1388,57 +1389,68 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
cluster={true}
|
|
cluster={true}
|
|
clusterRadius={50}
|
|
clusterRadius={50}
|
|
>
|
|
>
|
|
- <MapLibreRN.CircleLayer
|
|
|
|
|
|
+ <MapLibreRN.SymbolLayer
|
|
id="nomads_circle"
|
|
id="nomads_circle"
|
|
filter={['has', 'point_count']}
|
|
filter={['has', 'point_count']}
|
|
aboveLayerID={Platform.OS === 'android' ? 'place-continent' : undefined}
|
|
aboveLayerID={Platform.OS === 'android' ? 'place-continent' : undefined}
|
|
style={{
|
|
style={{
|
|
- circleRadius: [
|
|
|
|
|
|
+ iconImage: clusteredUsersIcon,
|
|
|
|
+ iconSize: [
|
|
'interpolate',
|
|
'interpolate',
|
|
['linear'],
|
|
['linear'],
|
|
['get', 'point_count'],
|
|
['get', 'point_count'],
|
|
0,
|
|
0,
|
|
- 15,
|
|
|
|
|
|
+ 0.33,
|
|
10,
|
|
10,
|
|
- 17,
|
|
|
|
|
|
+ 0.35,
|
|
20,
|
|
20,
|
|
- 19,
|
|
|
|
|
|
+ 0.37,
|
|
50,
|
|
50,
|
|
- 21,
|
|
|
|
|
|
+ 0.39,
|
|
75,
|
|
75,
|
|
- 23,
|
|
|
|
|
|
+ 0.41,
|
|
100,
|
|
100,
|
|
- 25
|
|
|
|
|
|
+ 0.43
|
|
],
|
|
],
|
|
- circleColor: 'rgba(237, 147, 52, 1)',
|
|
|
|
- circleStrokeWidth: 2,
|
|
|
|
- circleStrokeColor: '#FFFFFF',
|
|
|
|
- circleOpacity: 1
|
|
|
|
|
|
+ iconAllowOverlap: true
|
|
}}
|
|
}}
|
|
- />
|
|
|
|
|
|
+ ></MapLibreRN.SymbolLayer>
|
|
<MapLibreRN.SymbolLayer
|
|
<MapLibreRN.SymbolLayer
|
|
id="nomads_count"
|
|
id="nomads_count"
|
|
filter={['has', 'point_count']}
|
|
filter={['has', 'point_count']}
|
|
aboveLayerID={Platform.OS === 'android' ? 'nomads_circle' : undefined}
|
|
aboveLayerID={Platform.OS === 'android' ? 'nomads_circle' : undefined}
|
|
style={{
|
|
style={{
|
|
- textField: ['get', 'point_count'],
|
|
|
|
|
|
+ textField: [
|
|
|
|
+ 'case',
|
|
|
|
+ ['<', ['get', 'point_count'], 1000],
|
|
|
|
+ ['get', 'point_count'],
|
|
|
|
+ ['concat', ['/', ['round', ['/', ['get', 'point_count'], 100]], 10], 'k']
|
|
|
|
+ ],
|
|
textFont: ['Noto Sans Bold'],
|
|
textFont: ['Noto Sans Bold'],
|
|
textSize: [
|
|
textSize: [
|
|
'interpolate',
|
|
'interpolate',
|
|
['linear'],
|
|
['linear'],
|
|
['get', 'point_count'],
|
|
['get', 'point_count'],
|
|
0,
|
|
0,
|
|
- 13,
|
|
|
|
|
|
+ 13.5,
|
|
20,
|
|
20,
|
|
14,
|
|
14,
|
|
75,
|
|
75,
|
|
15
|
|
15
|
|
],
|
|
],
|
|
textColor: '#FFFFFF',
|
|
textColor: '#FFFFFF',
|
|
- textHaloColor: '#000000',
|
|
|
|
- textHaloWidth: 1,
|
|
|
|
textAnchor: 'center',
|
|
textAnchor: 'center',
|
|
- textOffset: [0, 0],
|
|
|
|
|
|
+ textOffset: [
|
|
|
|
+ 'interpolate',
|
|
|
|
+ ['linear'],
|
|
|
|
+ ['get', 'point_count'],
|
|
|
|
+ 0,
|
|
|
|
+ ['literal', [0, 0.85]],
|
|
|
|
+ 20,
|
|
|
|
+ ['literal', [0, 0.92]],
|
|
|
|
+ 75,
|
|
|
|
+ ['literal', [0, 1]]
|
|
|
|
+ ],
|
|
textAllowOverlap: true
|
|
textAllowOverlap: true
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|