|
@@ -26,7 +26,7 @@ export default (props) => {
|
26
|
26
|
// eslint-disable-next-line no-undef
|
27
|
27
|
const loc = location || DEFAULT_POS;
|
28
|
28
|
const [longitude, latitude] = loc.split(',');
|
29
|
|
-
|
|
29
|
+
|
30
|
30
|
const mks = readOnly ? [{
|
31
|
31
|
id: 1,
|
32
|
32
|
longitude,
|
|
@@ -35,8 +35,8 @@ export default (props) => {
|
35
|
35
|
width: 17,
|
36
|
36
|
height: 20
|
37
|
37
|
}] : [];
|
38
|
|
-
|
39
|
|
- console.log('-----mks---', mks);
|
|
38
|
+
|
|
39
|
+ console.log('-----mks---', mks);
|
40
|
40
|
|
41
|
41
|
return [
|
42
|
42
|
mks,
|
|
@@ -87,9 +87,12 @@ export default (props) => {
|
87
|
87
|
if (mapCtxRef.current) {
|
88
|
88
|
fixedLocation().then((res) => {
|
89
|
89
|
const { longitude, latitude } = res;
|
|
90
|
+ // console.log('longitude', longitude);
|
|
91
|
+ // console.log('latitude', latitude);
|
90
|
92
|
onChange([res.longitude, res.latitude].join(','));
|
91
|
93
|
moveTo(mapCtxRef.current, { longitude, latitude });
|
92
|
94
|
})
|
|
95
|
+
|
93
|
96
|
}
|
94
|
97
|
}
|
95
|
98
|
|
|
@@ -103,9 +106,10 @@ export default (props) => {
|
103
|
106
|
onChange([longitude, latitude].join(','));
|
104
|
107
|
})
|
105
|
108
|
}
|
106
|
|
- // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
109
|
+ // eslint-disable-next-line react-hooks/exhaustive-deps
|
107
|
110
|
}, [readOnly, getContext]);
|
108
|
111
|
|
|
112
|
+ console.log('-----方---》', center);
|
109
|
113
|
return (
|
110
|
114
|
<View className={style['map-wrapper']}>
|
111
|
115
|
{
|