ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

Can't find element with ionic 4 #163

Closed f22hd closed 5 years ago

f22hd commented 5 years ago

I'm submitting a ... (check one with "x")

If you choose 'problem or bug report', please select OS: (check one with "x")

cordova information: (run $> cordova plugin list)

insert the output from the command here

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

Current behavior: when application loading google map Error: Can not find the element [#map_canvas]

Expected behavior: Load google map

Related code, data or error log (please format your code or data): ts
this.map = GoogleMaps.create('map_canvas',options);

html

app.module : import { GoogleMaps } from '@ionic-native/google-maps/ngx';

providers:[GoogleMaps]


package.json
 "@ionic-native/google-maps": "^5.0.0-beta.26",
 "cordova-plugin-googlemaps": "^2.5.0",

ionic info
Ionic:

   ionic (Ionic CLI)             : 4.9.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.1
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

Cordova:

   cordova (Cordova CLI) : 7.1.0
   Cordova Platforms     : android 6.4.0, browser 5.0.4
   Cordova Plugins       : no whitelisted plugins (3 plugins total)

System:

   ios-deploy : 1.9.2
   NodeJS     : v8.11.4 (/usr/local/bin/node)
   npm        : 6.5.0
   OS         : macOS Sierra
   Xcode      : Xcode 9.2 Build version 9C40b
wf9a5m75 commented 5 years ago

Please share your project files on GitHub repository

f22hd commented 5 years ago

After deep analysis, the issue happened when [hidden] directive added to map element, I replaced to *ngIf and now working as expected.