npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

capacitor-plugin-amap

v6.0.5

Published

Amap Capacitor

Downloads

329

Readme

capacitor-plugin-amap

Amap Capacitor

大版本跟@capacitor

v6.x support Capacitor 6

Install

npm install capacitor-plugin-amap
npx cap sync

IOS

配置IOS_KEY IOS安装插件后,需在项目的capacitor.config.ts/capacitor.config.json中为项目配置IOS_KEY

const config: CapacitorConfig = {
    plugins: {
        AMap: {
            iosKey: "your key",
        },
    }
};

IOS安装插件后,需在XCODE的info.plist中为项目配置以下内容

    <key>NSLocationWhenInUseUsageDescription</key>
    <string>此应用需要定位权限才能正常使用</string>

Android

add the following to your app's build.gradle:

// 这里sdk获取方式不能用这种填充,可以忽略这步,内部实现会自动处理appkey
manifestPlaceholders = [
  AMAP_APPKEY: "map key",
]

API

init()

init() => void

locate()

locate() => any

Returns: 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


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 | 湿度 |