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

cordova-plugin-amap-navi

v1.0.0

Published

Cordova AMap Navigation Plugin

Downloads

9

Readme

cordova_plugin_amap_navi

使用高德地图sdk进行定位和导航的cordova plugin

使用科大讯飞sdk实现导航语音的合成和播报

目前是实现了Android插件,后续会逐渐添加iOS和其它平台

安装插件

androidamapkey: 高德地图android api key

iflytekappid: 科大讯飞app id

cordova plugin add https://github.com/starwander/cordova-plugin-amap-navi --variable androidamapkey=123 --variable iflytekappid=456

使用插件

定位:

var successCallback = function(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 获取定位精度状态
};

var errorCallback = function(message){
    console.log(message);  
};

AMapNavi.getLocation(successCallback, errorCallback);

导航:

var successCallback = function(message){
  //do something  
};

var errorCallback = function(message){
    console.log(message);  
};

cordova.plugins.AMapNavigation.navigation({
   lng: 起始地的经度,
   lat: 起始地的纬度
}, {
    lng: 终点的经度,
    lat: 终点的纬度
}, NaviType //导航类型,0为实时,1为模拟
successCallback, errorCallback);

删除插件

cordova plugin remove cordova-plugin-amap-navi