1.0.1 • Published 9 months ago

@wfkit/maplocation v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@wfkit/maplocation

Installation

pnpm i @wfkit/maplocation

Usage

import {
  MAP_LOCATION_TYPE,
  AMapLocation,
  BMapLocation,
} from '@wfkit/maplocation'

// 使用高德地图
const mapLocation = new AMapLocation({
  apiSecurityHost: '',
  apiSecurityKey: '',
  apiKey: '',
})

// 使用百度地图
const mapLocation = new BMapLocation({
  apiSecurityHost: '',
  apiKey: '',
})

// IP 定位
const result = await mapLocation.locate(MAP_LOCATION_TYPE.IP)

// GPS 定位
const result = await mapLocation.locate(MAP_LOCATION_TYPE.GPS)

License

MIT © YDWF.COM

1.0.1

9 months ago

1.0.0

12 months ago