@szlx/location
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

内部统一定位调用工具

Installtion

npm i @szlx/uni-location

Usage

import { getLocation, onLocationChange } from '@szlx/uni-location'

// 配置项
const options = {
  provider: 'amap',
  enableHighAccuracy: true,
  maximumAge: 3000,
  timeout: 30000,
  geocode: false
}
// 获取定位
getLocation(options).then(d => {}).catch(e => {]})

// 监听定位
onLocationChange({
  options,
  success: d => {},
  fail: e => {}
})

Readme

Keywords

none

Package Sidebar

Install

npm i @szlx/location

Weekly Downloads

2

Version

1.0.11

License

MIT

Unpacked Size

7.67 kB

Total Files

4

Last publish

Collaborators

  • szlx