diff --git a/src/component/mapCollectScreen.tsx b/src/component/mapCollectScreen.tsx index 74a4140..e53e96c 100644 --- a/src/component/mapCollectScreen.tsx +++ b/src/component/mapCollectScreen.tsx @@ -27,8 +27,9 @@ function MapCollectScreen({route,navigation}:MapCollectProps):React.JSX.Element{ const [modalInputLocation, setmodalInputLocation] = useState(false); const [modalBasemap, setmodalBasemap] = useState(false); const [modalLayerList, setmodalLayerList] = useState(false); - const [isSelectedLayer1, setSelectionLayer1] = useState(false); - const [layerList,setLayerList] = useState('') + const [isSelectedLayerPDAM, setSelectionLayerPDAM] = useState(false); + const [isSelectedLayerPermit, setSelectionLayerPermit] = useState(false); + const [layerList,setLayerList] = useState(['pdams','permits','pjus']) const getLocation = () => { Geolocation.getCurrentPosition( @@ -51,7 +52,7 @@ function MapCollectScreen({route,navigation}:MapCollectProps):React.JSX.Element{ await RNFetchBlob.config({ trusty : true }) - .fetch('GET', `https://c557-117-102-73-102.ngrok-free.app/catalog`,{ + .fetch('GET', `https://de36-117-102-73-102.ngrok-free.app/catalog`,{ "Accept": 'application/json', "Content-Type": "application/json", } @@ -149,58 +150,62 @@ function MapCollectScreen({route,navigation}:MapCollectProps):React.JSX.Element{ mapStyle={styleURL} zoomEnabled={true} compassEnabled={false} + > - { - console.log(e.features[0].properties?.nama); - Alert.alert(e.features[0].properties?.nama) - - }} - > - - {/* {isSelectedLayer1 ? - - : - null - } */} - - { - console.log(e.features[0].properties?.company_name); - // Alert.alert(e.features[0].properties?.nama) - - }} - > - - {/* { + console.log(e.features[0].properties?.nama); + Alert.alert(e.features[0].properties?.nama) + + }} + > + + + :null + } + { + isSelectedLayerPermit ? + { + console.log(e.features[0].properties!.company_name); + Alert.alert(e.features[0].properties!.company_name) + }} - /> */} - {/* {isSelectedLayer1 ? - - : - null - } */} - + > + + + + :null + } + + + {!delayRender ? <> - - - Administrasi Kecamatan Jakut + + + setSelectionLayerPDAM(newValue)} + /> + Pipa PDAM + + setSelectionLayer1(newValue)} + value={isSelectedLayerPermit} + onValueChange={(newValue) => setSelectionLayerPermit(newValue)} /> + Land Permit +