Download address and document https://lbs.qq.com/miniProgram/jsSdk/jsSdkGuide/jsSdkOverview
Tencent's location service can search for keywords to remind inverse address resolution address resolution route planning distance calculation to obtain the city list The way to
university is also in its own, hard work Learning, passionate youth
If you are interested in programming, you can join our qq group to communicate together: 974178910
Download SDK and package again
download
Download address https://lbs.qq.com/miniProgram/jsSdk/jsSdkGuide/jsSdkOverview After
downloading, remember to apply for a key to
enable WebServiceApi
Get the key and call the interface to use
Repackage
If you are uniapp
Create a new directory common/mapApi Create a new file common/mapApi/index.js
Put the downloaded file into it,
you can delete min
In index.js
const QQMapWX = require('./qqmap-wx-jssdk.js')
const mapApi = new QQMapWX({
key: "位置服务后台 拿到的key值"
})
module.exports = mapApi;
If not uniapp
The directory is
also in the index as follows
const QQMapWX = require('./qqmap-wx-jssdk.js')
const mapApi = new QQMapWX({
key: "位置服务后台 拿到的key值"
})
module.exports = mapApi;
test
We conduct a location search
Document address https://lbs.qq.com/miniProgram/jsSdk/jsSdkGuide/methodSearch
This is the usage of the official website.
Let's write a test.
Introduce
testing method
test() {
mapApi.search({
keyword: "酒店",
success: res => {
console.log(res)
}
})
}
testing successfully
The way of university is also in oneself, study hard, youth
with passion. If you are interested in programming, you can join our qq group to communicate together: 974178910