|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
import React, {useState, useEffect} from "react"; |
|
|
|
|
import { View, Text, StyleSheet, Alert, TouchableOpacity, Image } from "react-native"; |
|
|
|
|
import { View, Text, StyleSheet, Alert, TouchableOpacity, Image, StatusBar } from "react-native"; |
|
|
|
|
|
|
|
|
|
import MapLibreGL from '@maplibre/maplibre-react-native'; |
|
|
|
|
import { MapView,ShapeSource,Camera,UserLocation,PointAnnotation,FillLayer,LineLayer,VectorSource } from "@maplibre/maplibre-react-native"; |
|
|
|
|
@ -108,13 +108,17 @@ function MapCollectLineScreen({route,navigation}:MapCollectLineProps):React.JSX.
@@ -108,13 +108,17 @@ function MapCollectLineScreen({route,navigation}:MapCollectLineProps):React.JSX.
|
|
|
|
|
|
|
|
|
|
return( |
|
|
|
|
<View style={{flex:1}}> |
|
|
|
|
<StatusBar backgroundColor="#34A6F8" barStyle={'light-content'} /> |
|
|
|
|
<View key={"mainBackground"} style={{backgroundColor:'#34A6F8',width:'100%',height:'100%'}} /> |
|
|
|
|
|
|
|
|
|
<MapView |
|
|
|
|
style={{alignSelf:'stretch',flex:1}}
|
|
|
|
|
style={{width:'100%',height:'100%',position:'absolute',marginTop:10,borderTopRightRadius:50,borderTopLeftRadius:35,overflow:'hidden'}} |
|
|
|
|
mapStyle={styleURL} |
|
|
|
|
zoomEnabled={true} |
|
|
|
|
onRegionDidChange={(region)=> |
|
|
|
|
setZoom(region.properties.zoomLevel) |
|
|
|
|
} |
|
|
|
|
compassEnabled={false} |
|
|
|
|
> |
|
|
|
|
<Camera |
|
|
|
|
key={"camera"} |
|
|
|
|
@ -176,8 +180,27 @@ function MapCollectLineScreen({route,navigation}:MapCollectLineProps):React.JSX.
@@ -176,8 +180,27 @@ function MapCollectLineScreen({route,navigation}:MapCollectLineProps):React.JSX.
|
|
|
|
|
|
|
|
|
|
</MapView> |
|
|
|
|
|
|
|
|
|
{/* Widget Map */} |
|
|
|
|
<View style={styles.gotoLocate}> |
|
|
|
|
<TouchableOpacity style={{position:'absolute',backgroundColor:'#FFFFFF',width:50,height:50,borderRadius:25,alignItems:'center',justifyContent:'center',top:'7%',left:'4%'}}> |
|
|
|
|
<Image |
|
|
|
|
source={require('../../assets/icon/layerList.png')} |
|
|
|
|
// style={styles.buttonImageIconStyle}
|
|
|
|
|
/> |
|
|
|
|
</TouchableOpacity> |
|
|
|
|
<TouchableOpacity style={{position:'absolute',backgroundColor:'#FFFFFF',width:50,height:50,borderRadius:25,alignItems:'center',justifyContent:'center',top:'15%',left:'4%'}}> |
|
|
|
|
<Image |
|
|
|
|
source={require('../../assets/icon/mapOutline.png')} |
|
|
|
|
// style={styles.buttonImageIconStyle}
|
|
|
|
|
/> |
|
|
|
|
</TouchableOpacity> |
|
|
|
|
<TouchableOpacity style={{position:'absolute',backgroundColor:'#FFFFFF',width:50,height:50,borderRadius:25,alignItems:'center',justifyContent:'center',top:'23%',left:'4%'}}> |
|
|
|
|
<Image |
|
|
|
|
source={require('../../assets/icon/findmylock.png')} |
|
|
|
|
// style={styles.buttonImageIconStyle}
|
|
|
|
|
/> |
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* <View style={styles.gotoLocate}> |
|
|
|
|
<TouchableOpacity onPress={() => handleZoom(true)}> |
|
|
|
|
<Image |
|
|
|
|
source={require('../../assets/icon/plus.png')} |
|
|
|
|
@ -196,7 +219,8 @@ function MapCollectLineScreen({route,navigation}:MapCollectLineProps):React.JSX.
@@ -196,7 +219,8 @@ function MapCollectLineScreen({route,navigation}:MapCollectLineProps):React.JSX.
|
|
|
|
|
style={styles.buttonImageIconStyle} |
|
|
|
|
/> |
|
|
|
|
</TouchableOpacity> |
|
|
|
|
</View> |
|
|
|
|
</View> */} |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
startPoint.length === 0 ? |
|
|
|
|
currentPosition.length > 0 ? |
|
|
|
|
|