Google maps native problem


i try to start run a google maps native, but maps cant show to me.

I started from scetch.

  1. ionic start test --ts --v2
  2. ionic plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID=“AIza…” --variable API_KEY_FOR_IOS=“AIza…”
  3. then update page1
import {Component} from "@angular/core";
import {GoogleMap, GoogleMapsEvent, GoogleMapsLatLng} from 'ionic-native';

  templateUrl: 'build/pages/page1/page1.html',
export class Page1 {
  constructor() {
    // somewhere in your component
    let map = new GoogleMap('map');
  //  var GOOGLE = new GoogleMapsLatLng(37.422858, -122.085065);
    map.on(GoogleMapsEvent.MAP_READY).subscribe(() => console.log("Map is ready!"));


    <ion-navbar *navbar>
      <ion-title>Tab 1</ion-title>

    <ion-content padding class="page1">
      <h2>Welcome to Ionic!</h2>

        <div id="map" style="width: 400px; height:400px; background-color: #999"></div>
  1. ionic run android (with connected device - android 5.1.1)

Now i see only gray div without maps.
Anyone help me? I dont know what im doing wrong.
Thanks for help.

Can you remote inspect and see if there are any errors in your console? There could be something setup incorrectly and an error printed out there.

Same here. No error displayed when debugging. I can call “map.showDialog()”. Dialog apperas. But div remains blank.

In new version (Beta 9) is everything ok.

See the conversation here: