|
@@ -47,6 +47,7 @@ import TravelsIcon from 'assets/icons/bottom-navigation/globe-solid.svg';
|
|
|
import MapButton from 'src/components/MapButton';
|
|
|
import ScaleBar from 'src/components/ScaleBar';
|
|
|
import _ from 'lodash';
|
|
|
+const defaultUserAvatar = require('assets/icon-user-share-location-solid.png');
|
|
|
|
|
|
MapLibreGL.setAccessToken(null);
|
|
|
|
|
@@ -337,6 +338,15 @@ const UsersMapScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+ const locationFeature: GeoJSON.Feature<GeoJSON.Point> = {
|
|
|
+ type: 'Feature',
|
|
|
+ geometry: {
|
|
|
+ type: 'Point',
|
|
|
+ coordinates: [data.location_last_seen_location?.lng, data.location_last_seen_location?.lat]
|
|
|
+ },
|
|
|
+ properties: {}
|
|
|
+ };
|
|
|
+
|
|
|
return (
|
|
|
<SafeAreaView style={{ height: '100%' }}>
|
|
|
<StatusBar translucent backgroundColor="transparent" />
|
|
@@ -368,6 +378,7 @@ const UsersMapScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
lineWidth: ['interpolate', ['linear'], ['zoom'], 0, 0.2, 4, 1, 5, 1.5, 12, 3],
|
|
|
lineWidthTransition: { duration: 300, delay: 0 }
|
|
|
}}
|
|
|
+ belowLayerID="waterway-name"
|
|
|
/>
|
|
|
<MapLibreGL.FillLayer
|
|
|
id={regions.id}
|
|
@@ -402,6 +413,7 @@ const UsersMapScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
lineWidth: ['interpolate', ['linear'], ['zoom'], 0, 0.2, 4, 1, 5, 1.5, 12, 3],
|
|
|
lineWidthTransition: { duration: 300, delay: 0 }
|
|
|
}}
|
|
|
+ belowLayerID="waterway-name"
|
|
|
/>
|
|
|
<MapLibreGL.FillLayer
|
|
|
id={countries.id}
|
|
@@ -446,6 +458,35 @@ const UsersMapScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
</>
|
|
|
)}
|
|
|
|
|
|
+ {data.location_sharing && data.location_last_seen_location && data.own_profile !== 1 && (
|
|
|
+ <MapLibreGL.ShapeSource id="user_location" shape={locationFeature}>
|
|
|
+ <MapLibreGL.SymbolLayer
|
|
|
+ id="user_symbol"
|
|
|
+ filter={['!', ['has', 'point_count']]}
|
|
|
+ aboveLayerID={Platform.OS === 'android' ? 'place-continent' : undefined}
|
|
|
+ style={{
|
|
|
+ iconImage: defaultUserAvatar,
|
|
|
+ iconSize: [
|
|
|
+ 'interpolate',
|
|
|
+ ['linear'],
|
|
|
+ ['zoom'],
|
|
|
+ 0,
|
|
|
+ 0.24,
|
|
|
+ 5,
|
|
|
+ 0.28,
|
|
|
+ 10,
|
|
|
+ 0.33,
|
|
|
+ 15,
|
|
|
+ 0.38,
|
|
|
+ 20,
|
|
|
+ 0.42
|
|
|
+ ],
|
|
|
+ iconAllowOverlap: true
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </MapLibreGL.ShapeSource>
|
|
|
+ )}
|
|
|
+
|
|
|
<MapLibreGL.Camera ref={cameraRef} />
|
|
|
{location && (
|
|
|
<MapLibreGL.UserLocation
|