@vaecebyz/capacitor-amap
v1.0.9
Published
Amap for Capacitor
Readme
@vaecebyz/capacitor-amap
Amap for Capacitor
Install
npm install @vaecebyz/capacitor-amap
npx cap syncAPI
load()locate()weather(...)calculate(...)checkPermissions()requestPermissions()echo()- Interfaces
- Type Aliases
load()
load() => anyReturns: any
locate()
locate() => anyReturns: any
weather(...)
weather(param: { adCode: string; }) => any| Param | Type |
| ----------- | -------------------------------- |
| param | { adCode: string; } |
Returns: any
calculate(...)
calculate(params: { startLatitude: number; startLongitude: number; endLatitude: number; endLongitude: number; }) => any| Param | Type |
| ------------ | ---------------------------------------------------------------------------------------------------------- |
| params | { startLatitude: number; startLongitude: number; endLatitude: number; endLongitude: number; } |
Returns: any
checkPermissions()
checkPermissions() => anyReturns: any
requestPermissions()
requestPermissions() => anyReturns: any
echo()
echo() => anyReturns: any
Interfaces
Location
| Prop | Type | Description |
| ------------------ | ------------------- | ----------- |
| accuracy | number | 定位精度 |
| adCode | string | 区域编码 |
| address | string | 地址 |
| city | string | 城市|区 |
| cityCode | string | 城市编码 |
| latitude | number | 精度 |
| longitude | number | 纬度 |
| aoiName | string | 当前定位点的AOI信息 |
| country | string | 国家 |
| district | string | 城区信息 |
| poiName | string | 当前定位点的POI信息 |
| province | string | 省份 |
| street | string | 街道 |
| streetNum | string | 街道号 |
| locationTime | Date | 定位时间 |
WeatherInfo
| Prop | Type | Description |
| ------------------- | --------------------------------- | ----------- |
| type | 'live' | 'forecast' | |
| weather | string | 天气 |
| temperature | string | 温度 |
| city | string | 城市|区 |
| province | string | 省份 |
| windDirection | string | 风向 |
| windPower | string | 风力 |
| humidity | string | 湿度 |
PermissionStatus
| Prop | Type |
| -------------- | ----------------------------------------------------------- |
| location | PermissionState |
Type Aliases
PermissionState
'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'
