|
@@ -18,7 +18,6 @@ import { styles } from './style';
|
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
|
import { Colors } from 'src/theme';
|
|
|
import { storage, StoreType } from 'src/storage';
|
|
|
-import { RegionPayload } from '@maplibre/maplibre-react-native/javascript/components/MapView';
|
|
|
import * as turf from '@turf/turf';
|
|
|
import * as Location from 'expo-location';
|
|
|
import { Image as ExpoImage } from 'expo-image';
|
|
@@ -275,11 +274,12 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
|
|
|
const [tilesType, setTilesType] = useState({ label: 'NM regions', value: 0 });
|
|
|
const tilesTypes = [
|
|
|
+ { label: 'Blank', value: -1 },
|
|
|
{ label: 'NM regions', value: 0 },
|
|
|
{ label: 'UN countries', value: 1 },
|
|
|
{ label: 'DARE places', value: 2 }
|
|
|
];
|
|
|
- const [type, setType] = useState<'regions' | 'countries' | 'dare'>('regions');
|
|
|
+ const [type, setType] = useState<'regions' | 'countries' | 'dare' | 'blank'>('regions');
|
|
|
const [seriesFilter, setSeriesFilter] = useState<any>({
|
|
|
visible: true,
|
|
|
groups: [],
|
|
@@ -724,6 +724,7 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
closeCallout();
|
|
|
return;
|
|
|
}
|
|
|
+ if (type === 'blank') return;
|
|
|
try {
|
|
|
const { screenPointX, screenPointY } = event.properties;
|
|
|
|
|
@@ -830,7 +831,7 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- const handleRegionDidChange = async (feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>) => {
|
|
|
+ const handleRegionDidChange = async (feature: GeoJSON.Feature<GeoJSON.Point, any>) => {
|
|
|
if (!feature) return;
|
|
|
const { zoomLevel } = feature.properties;
|
|
|
const { coordinates } = feature.geometry;
|
|
@@ -1592,6 +1593,7 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
}}
|
|
|
icon={TravelsIcon}
|
|
|
text="Travels"
|
|
|
+ active={type !== 'blank'}
|
|
|
/>
|
|
|
<MapButton
|
|
|
onPress={() => {
|