/* eslint-disable no-underscore-dangle */ import * as WebBrowser from 'expo-web-browser'; import * as React from 'react'; import { StatusBar } from 'expo-status-bar'; import { Div, Button, Image, Text, Avatar, Icon, Input, } from 'react-native-magnus'; import { Appbar } from 'react-native-paper'; import { ScrollView } from 'react-native-gesture-handler'; import useModel from 'flooks'; import { getSearch } from '../../Utils/MapUtils'; // 搜索 export default function SearchMapScreen({ navigation }) { const [points, setPoints] = React.useState([]); return ( <>
南京市 } onChangeText={(val) => { getSearch(val, 'nearby(31.983908,118.730357,10000)').then( (res) => { setPoints(res.pois); } ); }} />
{points.map((item) => { return ( { navigation.navigate('Home'); }} /> ); })}
); } function AddressItem({ info, onPress }) { const distance = info._distance > 1000 ? `${(info._distance / 1000).toFixed(2)}km` : `${info._distance}m`; return ( ); }