New google map plugin fails to install


#1

The google map support seems to have completely changed a few days ago

The proposed incantation:

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

fails:

Failed to fetch plugin https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps via registry.

The V1.4.5 incantation

onic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID= “mykey>”

seems OK


#2

So what is broken where exactly?


#3

Just made a new vanilla tabs project, checked it works with ionic serve then ran the command above with the same result:

ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID="AIzaSyDIzLSsBRKuSZfyJaMjEXqAXUapKVCTMRU" 
cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID=AIzaSyDIzLSsBRKuSZfyJaMjEXqAXUapKVCTMRU --save
An error occurred while running cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multi... (exit code 1):
        
        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.
        Error: cmd: Command failed with exit code 1 Error output:
        npm WARN addRemoteGit Error: not found: git
        npm WARN addRemoteGit     at getNotFoundError (F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\which.js:14:12)
        npm WARN addRemoteGit     at F (F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\which.js:69:19)
        npm WARN addRemoteGit     at E (F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\which.js:81:29)
        npm WARN addRemoteGit     at F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\which.js:90:16
        npm WARN addRemoteGit     at F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
        npm WARN addRemoteGit     at F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
        npm WARN addRemoteGit     at F:\JCinstalls\nodejsA\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
        npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15)
        npm WARN addRemoteGit  git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps resetting remote C:\Users\JC\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-mapsplugin-cordova-plugin-googlemaps-git-multiple-maps-19e06bb0 because of error: { Error: not found: git
        npm WARN addRemoteGit     at getNotFoundError (F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\which.js:14:12)
        npm WARN addRemoteGit     at F (F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\which.js:69:19)
        npm WARN addRemoteGit     at E (F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\which.js:81:29)
        npm WARN addRemoteGit     at F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\which.js:90:16
        npm WARN addRemoteGit     at F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\node_modules\isexe\index.js:44:5
        npm WARN addRemoteGit     at F:\JCinstalls\nodejsA\node_modules\npm\node_modules\which\node_modules\isexe\windows.js:29:5
        npm WARN addRemoteGit     at F:\JCinstalls\nodejsA\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
        npm WARN addRemoteGit     at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT' }
        npm ERR! git clone --template=C:\Users\JC\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/mapsplugin/cordova-plugin-googlemaps.git C:\Users\JC\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-mapsplugin-cordova-plugin-googlemaps-git-multiple-maps-19e06bb0: undefined
        npm ERR! git clone --template=C:\Users\JC\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/mapsplugin/cordova-plugin-googlemaps.git C:\Users\JC\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-mapsplugin-cordova-plugin-googlemaps-git-multiple-maps-19e06bb0: undefined
        npm ERR! Windows_NT 6.1.7601
        npm ERR! argv "F:\\JCinstalls\\nodejsA\\node.exe" "F:\\JCinstalls\\nodejsA\\node_modules\\npm\\bin\\npm-cli.js" "install" "https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps" "--save"
        npm ERR! node v6.11.1
        npm ERR! npm  v3.10.10
        npm ERR! code ENOGIT
        
        npm ERR! not found: git

#4

This sounds like a problem on the plugin’s side, nothing Ionic can do about it.

Where do you get that command to execute from? Who says to do this?


#5

https://ionicframework.com/docs/native/google-maps/

I suggest going back to the “Angular 2+ components for Google Maps.” [@agm/core] until this is fixed


#6

What is your ionic info output?


#7
cli packages: (C:\Users\JC\AppData\Roaming\npm\node_modules)
    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2
global packages:
    Cordova CLI : 7.0.1
 
local packages:
    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.6.0
System:
    Android SDK Tools : 25.2.5
    Node              : v6.11.1
    npm               : 3.10.10 
    OS                : Windows 7

#8

You might be able to fix this by adding --nofetch to the command you use to install. Let me know if this works.


#9

My experience with the latest google maps plugin is that it is unstable. It caused major slowness in my application, super slow scrolling and overall sluggish experience. Once I removed the plugin, everything came back to normal. I know it is still in beta now but when a plugin has such a big impact on the whole application, it is just not possible to use it anymore. A few weeks ago, the version that was available completely override the back button handlers. Took me weeks to find out it was caused by the google maps plugin. Major pain in the ***.

I might have to abandon ionic/cordova because of these issues and go native. I found I spent more time fixing environment and plugin issues than actually coding my app. Sigh


#10

No difference
Another line to satisfy the forum gubbins.
JC


#11

I needed to find another plugin than the one suggested by Ionic because it would only work with real devices (I’m developing a PWA) and I was able to make this one work. It uses the javascript API key instead of one for android and one for ios and so far the performance are great (Tested on Nexus 7 in PWA and in the browser).


#12

No joy

call cordova plugin add https://github.com/Motoralfa/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID=“my key”

Error: Failed to fetch plugin https://github.com/Motoralfa/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.
Failed to get absolute path to installed module


#13

Why does anyone use these plugins - much easier and complete to use the usual google maps API?

In case anyone hasn’t found this and is a frustrated as I am by the hopeless documentation, these examples are useful:

Worth removing the crosswalk plugin from them, however:

ionic cordova plugin remove cordova-plugin-crosswalk-webview

JC


#14

https://ionicframework.com/docs/native/google-maps/
Show 404 error!

Please, help me!
Thank you so much!


#15

Google maps plugin does not exist any more on ionic official website. Should i use the Google maps javascript API??


#16