Commit aad7550e by chenwq

高德地图切换成百度地图

1 parent fb35f069
......@@ -9,6 +9,11 @@
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.7.tgz",
"integrity": "sha512-R2FyCk0mK2xvUX2dMgVZjVG512RKBj7ELMDxjRJjhQWtw4495WBgbl5Yb4v2A6d4vWJe6z9toKgDJTciN0Bo9A=="
},
"glsk-map-jssdk": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/glsk-map-jssdk/-/glsk-map-jssdk-0.1.1.tgz",
"integrity": "sha512-kwCyU8A1t7Q7V2hlzC03nc9VNNW9HPXQ5YhHsGGnrEtPxykGDG7AEyT5O7LY1zZk/8adkkk6FHgCM53r6p/4yw=="
},
"glsx-applet-component": {
"version": "1.1.24",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.1.24.tgz",
......@@ -18,11 +23,6 @@
"version": "0.2.8",
"resolved": "https://registry.npmmirror.com/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz",
"integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A=="
},
"glsx-map-sdk": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/glsx-map-sdk/-/glsx-map-sdk-0.1.5.tgz",
"integrity": "sha512-hvAEOZnc4b1bVDlG0PPWRJCNZbAry6FMu/eGdP2LiRyujuNJHL4cHmqwdtqgwXmeTkglomtIJdGoJtU8jwHPNQ=="
}
}
}
......@@ -7,7 +7,7 @@
"@vant/weapp": "^1.10.7",
"glsx-applet-component": "^1.1.24",
"glsx-common-sdk": "^0.2.8",
"glsx-map-sdk": "^0.1.5"
"glsk-map-jssdk": "^0.1.1"
},
"devDependencies": {},
"scripts": {
......
......@@ -56,10 +56,11 @@ Page({
// let address = formData.provinceName || '' + formData.cityName || '' + formData.merchantAddress || ''
let address = (formData.provinceName || '') + (formData.cityName || '')
mapApi.geocoder(address).then(res => {
let location = res?.geocodes[0]?.location.split(',')
// let location = res?.geocodes[0]?.location.split(',')
let location = res?.location
this.setData({
['formData.longitude']: location[0],
['formData.latitude']: location[1],
['formData.longitude']: location.lng,
['formData.latitude']: location.lat,
})
})
},
......
......@@ -30,10 +30,11 @@ Page({
// let address = formData.provinceName || '' + formData.cityName || '' + formData.merchantAddress || ''
let address = (formData.provinceName || '') + (formData.cityName || '')
mapApi.geocoder(address).then(res => {
let location = res?.geocodes[0]?.location.split(',')
// let location = res?.geocodes[0]?.location.split(',')
let location = res?.location
this.setData({
['formData.longitude']: location[0],
['formData.latitude']: location[1],
['formData.longitude']: location.lng,
['formData.latitude']: location.lat,
})
})
},
......
import GlMap from 'glsx-map-sdk'
import GlMap from 'glsk-map-jssdk'
export default new GlMap()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!