【发布时间】:2016-02-05 19:11:57
【问题描述】:
我正在 Phonegap 中制作一个应用程序,我必须在其中显示 Google 地图。我已经按照教程https://github.com/mapsplugin/cordova-plugin-googlemaps/wiki/Phonegap-Usage
但它显示错误:
cordova.js plugins/plugins-google.maps/www/googlemap-cdv-plugin is undefined.
请告诉我如何解决这个错误。
【问题讨论】:
-
再试几次
cordova remove plugin.google.maps and cordova add plugin.google.maps。 -
我已经这样做了,但问题仍然存在
-
@shivani Google 地图插件过于复杂,无法与 cordova 应用程序一起使用。您可以使用 Javascript Google 地图,这是在您的应用中使用 Google 地图功能的更好选择。
-
查看此链接可能会有所帮助:stackoverflow.com/questions/26037702/…
-
@shivani 你试过这个
C:\test\HelloMap> cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_API_KEY_IS_HERE"
标签: javascript cordova google-maps phonegap-plugins