2015-11-26 52 views
0

我正在開發使用worklight的混合應用程序我想用標記打開本地地圖(用於Android的iOS和Google Map的Apple地圖),然後返回到應用程序完了。直到現在我已經實現了打開本地地圖的URL,它在默認瀏覽器上打開本地地圖。但我的要求是打開標記點擊本地地圖。Worklight 7.1使用mapkit cordova插件打開本地地圖應用程序

在Google期間,我發現瞭解決我的問題的Mapkit cordova插件,但我不知道如何將Mapkit cordova插件與worklight集成。 如果有人知道mapkit與android和IOS的worklight集成,請幫助我。

****************************************** *******更新:*****************************************

經過大量的RnD,我發現下面的插件: phonegap-launch-navigator 。配置安裝插件科爾多瓦在工作燈項目下面

代碼是考慮到啓動本機地圖:在Android中的config.xml

launchnavigator.navigate(
      "London, UK", 
      null, 
      function(){ 
       alert("Plugin success"); 
      }, 
      function(error){ 
       alert("Plugin error: "+ error); 
      }); 

<!-- android --> 
    <platform name="android"> 
    <js-module src="www/default/js/launchnavigator.js" name="LaunchNavigator"> 
    <clobbers target="launchnavigator" /> 
    </js-module> 
    <config-file target="res/xml/config.xml" parent="/*"> 
    <feature name="LaunchNavigator"> 
    <param name="android-package" value="android.LaunchNavigator"/> 
    </feature> 
    </config-file> 
    <source-file src="src/android/LaunchNavigator.java" target-dir="src/com/hhMobileApp" /> 
    </platform> 

的java文件路徑

native\src\android\LaunchNavigator.java

js文件路徑:

www\default\js\launchnavigator.js

後配置PhoneGap的推出導航儀插件,讓下面的錯誤。

error: uncaught referenceError: module is not define.

請提出您的投入來解決這個錯誤在推出的Android原生應用:

+0

@Idan Adar請你看看這個問題。 – Priyank

+0

@Vivin K你可以看看這個問題。 – Priyank

回答

1

退房此鏈接:您可以在config.xml文件中指定,然後 https://github.com/mapsplugin/cordova-plugin-googlemaps

插件,請遵循鏈接。

您也可以創建自己的原生地圖視圖並使用來自javascript的WL.NativePage.show()進行調用。

+0

感謝您的職位。我會執行並回復你。 – Priyank

+0

你能告訴我哪些代碼需要從plugin.xml複製並粘貼到config.xml運行插件,因爲我得到「未找到插件」錯誤。 – Priyank

相關問題