
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
cordova-plugin-amap-location
Advanced tools
> 支持ios, android 开通服务: [http://lbs.amap.com](http://lbs.amap.com)
支持ios, android 开通服务: http://lbs.amap.com
cordova plugin add cordova-plugin-amap-location --variable IOS_KEY=你的KEY --variable ANDROID_KEY=你的KEY --save
或
ionic cordova plugin add cordova-plugin-amap-location --variable IOS_KEY=你的KEY --variable ANDROID_KEY=你的KEY
cordova plugin add cordova-plugin-cocoapod-support --save
或
ionic cordova plugin add cordova-plugin-cocoapod-support
配置
var config = {
// ios配置
locationTimeout: 10, // 定位Timeout(s)
reGeocodeTimeout: 10, // 地址信息Timeout(s)
iosAccuracy: 1000, // 精确度(m)
distanceFilter: 10, // 连续定位最小位移(m)
watchWithReGeocode: false, // 连续定位是否返回地址信息
iosBackground: true, // 后台定位
// android配置
interval: 2000, // 连续定位时间间隔(ms)
androidAccuracy: 1, // 精确度 0. Battery_Saving 1. Hight_Accuracy, 2. Device_Sensors
needAddress: true // 是否返回地址信息
}
单次定位
window.AmapLocation.getCurrentPosition(
config
,
x => {
console.log(x);
},
e => console.error(e)
);
连续定位
window.AmapLocation.watchPosition(
config
,
x => {
console.log(x);
},
e => console.error(e)
);
清除连续定位
window.AmapLocation.clearWatch(
x => {
console.log(x);
},
e => console.error(e)
);
FAQs
> 支持ios, android 开通服务: [http://lbs.amap.com](http://lbs.amap.com)
We found that cordova-plugin-amap-location demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.