【问题标题】:Latest ionic google map component fails最新的离子谷歌地图组件失败
【发布时间】:2018-02-02 00:42:04
【问题描述】:

Ionic google map 组件以前是angular2-google-maps,重命名为@agm/core

文档现在指定了这个咒语:

$ ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
$ npm install --save @ionic-native/google-maps

但是,当我运行时:

ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID="<myKey>"

我收到此错误:

Error: Failed to fetch plugin https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.

是我做错了什么,还是缺少组件?

谢谢。

【问题讨论】:

  • 试试cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID=yourkey --save
  • 遗憾的是,没有区别。
  • 您是否从命令中删除了 ionic?
  • 没有帮助 - 错误显示“无法获取插件”

标签: google-maps ionic-framework


【解决方案1】:

我遇到了同样的问题,但我创建了一个存储库的分支并从那里安装插件,这对我有用。如果你想尝试从我的 Repo 安装

$cordova plugin add https://github.com/Motoralfa/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID="..." --save

我试过不使用 Ionic 命令,但我认为它也可以工作!

【讨论】:

  • 很遗憾,这也失败了。也许是因为我在苏格兰?我已经放弃并使用@agm/core 回来了。
  • @jcsubmit 请再试一次。
猜你喜欢
  • 2019-07-15
  • 1970-01-01
  • 1970-01-01
  • 2014-12-21
  • 2018-04-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多