cordova-plugin-googlemaps: White map or build failed with multiples errors in Ionic 5

Hi,

I use this plugin with my Ionic 5 app. Here my ionic info result and environment versions : ionicinfo

Here my package.json : dependencies devDependencies packagejson

Here my different app files : SCSS FILE scss HTML FILE html TS FILE ts1 ts2 ts3 ts4

I tried these different solutions, with and without installed also cordova-plugin-googlemaps-sdk :

  • Install cordova-plugin-googlemaps on “github:mapsplugin/cordova-plugin-googlemaps#918eb5a1bfce9595e922b3ad2442ff81cb9a0fa0” (build failed)
  • Install cordova-plugin-googlemaps on 2.7.1 version (build success but white map)
  • Install cordova-plugin-googlemaps on “git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git” (build failed)
  • Install cordova-plugin-googlemaps on “git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git#multiple_maps” (build success but white map)
  • Install cordova-plugin-googlemaps on "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git#0b8ea76ad34fb2a202a9de1b9d0e051a82ad9443" (build success but white map)

Here you can see errors in console when build failed : failed

For more details, I already worked with googlemaps-cordova-plugin in Ionic v3 without problem.

I added in my index.html this line : <script async defer src="https://maps.googleapis.com/maps/api/js?key=MYKEY&v=3.exp&libraries=places"></script>

I added in my config.xml these lines : <preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="MYKEY" /> <preference name="GOOGLE_MAPS_IOS_API_KEY" value="MYKEY" />

Finally, I have a question… Here https://github.com/mapsplugin/cordova-plugin-googlemaps the documentation indicate that in v2.7.0 :

  • Re-adoption: cordova-plugin-googlemaps-sdk dependency

So… We must also download cordova-plugin-googlemaps-sdk on project or not ?

Thank all for your replies…!

About this issue

Most upvoted comments

I used https://github.com/mapsplugin/cordova-plugin-googlemaps.git#0b8ea76ad34fb2a202a9de1b9d0e051a82ad9443 for the white map fix, which works ! I wonder if this plugin is still maintained …