Ionic-native-google-maps: Maps is not working inside Modals - Element not found error.

Created on 6 Feb 2019  路  3Comments  路  Source: ionic-team/ionic-native-google-maps

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

  • [ ] question
  • [ x] any problem or bug report
  • [ x] feature request

Current behavior:
Loading Map in a modal. Currently if this.map = GoogleMaps.create('map_canvas'); is called inside a modal, it throws an error -Error: Can not find the element [#map_canvas] While it is written in corresponding modal HTML file.
Expected behavior:
I suspect it is because TARGET_ELEMENT_FINDING_QUERYS
in this line containing only 'ion-router-outlet #', '.show-page #',. Whilehttps://github.com/ionic-team/ionic-native-google-maps/blob/bb604e0cad658872adb1ab060b9489a9b8ec7e98/src/%40ionic-native/plugins/google-maps/index.ts#L14
If we can add .show-modal in this, i think we can use this in modal as well.
I might be wrong, but if i am not understanding wrong, there is no harm in using map in Modals, Right ?

All 3 comments

This plugin does not work in a modal.

Try remove background color to ion-content, this working for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fadao23 picture fadao23  路  5Comments

bcba25 picture bcba25  路  7Comments

leabdalla picture leabdalla  路  9Comments

nick-kisanhub picture nick-kisanhub  路  3Comments

MohamedBesher picture MohamedBesher  路  10Comments