How to use Ionic Google Maps without Cordova?

I am building a PWA with Ionic, so I don’t need Cordova. Following the instructions to use the Ionic Google Maps for Ionic v4 it says to add a Cordova plugin, with the API keys. Source


  • Is it possible to use @ionic-native/ without Cordova?
  • Where should I set the API Key?


1 Like

I used this website for my integration:

1 Like

This demo is built with cordova browser platform. So cordova is required.

Here is steps that how to build this project for PWA.

$> git clone

$> vim package.json  // then replace `(YOUR_API_KEY)` with your key

$> vim config.xml  //  then replace `(YOUR_API_KEY)` with your key

$> npm i

$> ionic cordova prepare

$> npm run buildwww
1 Like

Oh, ok then. I thought that if I was build a PWA I shouldn’t use Cordova at all. But if there’s the option to build Cordova for browser, it seems about right. Thanks for your attention!

You have a few options, for example:

1 Like

After buidlwww, can I deploy all files in doc directory to Firebase for hosting?

Very Thanks. It works!!! But it’s not easy to develop for browser platform because there is not any support for live-reload. I found your suggestion at . But the plugin, cordova-plugin-browsersync doesn’t look like working any more.

In Ionic 4 you can opt for JavaScript Google Maps check this tutorial on same

1 Like