|
@@ -9,7 +9,7 @@ import { TimeFormatter } from "@/utils/time_format";
|
|
|
import { systemLocation } from "@/services/common";
|
|
import { systemLocation } from "@/services/common";
|
|
|
|
|
|
|
|
// let LeafletView = require('react-native-leaflet-maps').LeafletView
|
|
// let LeafletView = require('react-native-leaflet-maps').LeafletView
|
|
|
-let location:any = null
|
|
|
|
|
|
|
+let location: any = null
|
|
|
export default function map() {
|
|
export default function map() {
|
|
|
// const [location, setLocation] = useState<any>(null)
|
|
// const [location, setLocation] = useState<any>(null)
|
|
|
const navigation = useNavigation()
|
|
const navigation = useNavigation()
|
|
@@ -117,10 +117,12 @@ export default function map() {
|
|
|
mapCenterPosition={centerPosition()}
|
|
mapCenterPosition={centerPosition()}
|
|
|
mapMarkers={mapMarkers()}
|
|
mapMarkers={mapMarkers()}
|
|
|
onMessageReceived={e => {
|
|
onMessageReceived={e => {
|
|
|
|
|
+ if (e.payload && e.payload.mapCenterPosition)
|
|
|
|
|
+ console.log((e as any).payload.mapCenterPosition)
|
|
|
// console.log(e)
|
|
// console.log(e)
|
|
|
// setCount(count => count + 1)
|
|
// setCount(count => count + 1)
|
|
|
- // if (e.payload && e.payload.mapCenterPosition)
|
|
|
|
|
- // location = e.payload.mapCenterPosition
|
|
|
|
|
|
|
+ if (e.payload && e.payload.mapCenterPosition)
|
|
|
|
|
+ location = e.payload.mapCenterPosition
|
|
|
// if (e.event && e.event == 'onMoveEnd') {
|
|
// if (e.event && e.event == 'onMoveEnd') {
|
|
|
// if (e.payload && e.payload.mapCenterPosition)
|
|
// if (e.payload && e.payload.mapCenterPosition)
|
|
|
// setLocation(e.payload.mapCenterPosition)
|
|
// setLocation(e.payload.mapCenterPosition)
|