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-locnavi-websdk

v1.0.13

Published

Cordova LocNaviWebSDK Plugin

Downloads

9

Readme

cordova 引入 LocNaviWebSDK 簡介

cordova-plugin-LocNaviWebSDK 是一套面向 cordova 開發者使用LocNaviWebSDK的插件,開發者可自行引用該插件輕鬆實現地圖展示、導航至具體poi等功能。 1.*的版本开始支持Android Support。0.*和2.*版本支持Android X库。iOS部分没有什么影响

獲取AppKey

appKey mapId targetId 請向[email protected] 申請

插件引用

npm引用

直接引入线上npm包

// android support 使用1.*的版本
cordova plugin add [email protected]
// android x 使用0.*和2.*的版本
cordova plugin add [email protected]

如果已經添加cordova-plugin-locnavi-websdk,請先移除,在進行添加

cordova plugin remove cordova-plugin-locnavi-websdk
cordova plugin add cordova-plugin-locnavi-websdk

本地引用

拷貝插件文件夾cordova-plugin-LocNaviWebSDK 至項目目錄 (相對路徑)

cordova plugin add ./cordova-plugin-LocNaviWebSDK

如果已經添加cordova-plugin-LocNaviWebSDK,請先移除,在進行添加

//先查看安装了什么插件
cordova plugin list
cordova plugin remove cordova-plugin-LocNaviWebSDK
cordova plugin add ./cordova-plugin-LocNaviWebSDK

衝突處理

若是加入插件遇到衝突,請加入--force指令,如下:

cordova plugin add ./cordova-plugin-LocNaviWebSDK --force

安裝注意事項

  • iOS

    • 要安裝Cordova,需要先安裝Node.js在Node.js官網上下載並安裝
    • 添加該插件之後,cd到iOS項目目錄,使用pod install
    • 打開項目工程後會發現有些文件沒有,比如Plugins文件可以在 cordova-plugin-LocNaviWebSDK 拷貝
    • 权限设置请参考iOS原生demo iOS README

SDK初始化

        LocNaviWebSDKPlugin.init(appkey, {
            userId: "123",
            serverUrl: "https://xxx.com",
            uuids: ["uuid1", "uuid2"],
            uploadApi: "https://xxx.com", //需要https
            uploadInterval: 1000
        });

顯示室內地圖

  LocNaviWebSDKPlugin.showMap(mapId);

導航至具體地址

  LocNaviWebSDKPlugin.showMap(mapId, poi);

進入 IOS 和 Android 平台查看相關的 README 進行設置

iOS文檔

Android文檔