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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gaodelocation

v2.0.0

Published

Cordova Location Plugin Powerd by KIT

Downloads

2

Readme

#com.kit.cordova.amaplocation 使用高德Android定位SDK进行定位,以解决webapp中定位不准的问题

安装&配置

cordova plugin E:\Study\Ionic\plugins\com.kit.cordova.amaplocation
修改plugin.xml中的高德定位SDK对应的KEY
<meta-data android:name="com.amap.api.v2.apikey" android:value="您的API KEY" />

调用方法

document.addEventListener('deviceready', function(){
	window.LocationPlugin.getLocation(successCallback,errorCallback);
}, false);

function successCallback(data) {
	//data.longitude 经度
	//data.latitude 纬度
	//data.accuracy 返回定位精度半径
	//data.address 返回地址的详细描述,包括省、市、区和街道
	//data.floor 返回定位到的室内地图的楼层,如果不在室内或者无数据,则返回默认值null。
	//data.province 返回定位位置的提供者名称。
	//data.road 返回定位信息中道路名称,如“阜荣街”。
	//data.speed 返回定位速度 ,单位:米/秒,如果此位置不具有速度,则返回0.0 。
	//data.time 返回定位时间 ,毫秒时间(距离1970年 1月 1日 00:00:00 GMT的时间)
	//data.hasAccuracy 获取定位精度状态

}

function errorCallback(msg) {
    //高德定位SDK返回的错误代码编号

    //响应码	说明
    //0	正常,有返回结果
    //21	IO 操作异常
    //22	连接异常
    //23	连接超时
    //24	无效的参数
    //25	空指针异常
    //26	url 异常
    //27	未知主机
    //28	连接服务器失败
    //29	通信协议解析错误
    //30	http 连接失败
    //31	未知的错误
    //32	keykey 鉴权验证失败,请检查key绑定的sha1值、packageName与apk是否对应
    //33	没有获取到定位权限,导致定位失败,请告知用户授予定位权限
    //34	无法获取城市信息
	console.log("错误消息:"+msg);
}