1.0.4 • Published 5 years ago

tencent-geolocation-vue v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

tencent-geolocation-vue

在vue中使用的腾讯定位

How to use

npm i tencent-geolocation-vue -S

const key = '<申请的腾讯定位sdk>';
 
const app = '<申请的app名字>';
 
const geolocation = new Geolocation(key, app);
 
geolocation.getLocation(successCallback, errorCallback);
 
function successCallback(position) {
    console.log(position)
}
 
function errorCallback() {
    console.log('error')
}