ionic-team / ionic-native-google-maps

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

Maps is not working inside Modals - Element not found error. #172

Closed arihantdaga closed 5 years ago

arihantdaga commented 5 years ago

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

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 ?

wf9a5m75 commented 5 years ago

This plugin does not work in a modal.

wf9a5m75 commented 5 years ago

https://github.com/mapsplugin/cordova-plugin-googlemaps/#how-does-this-plugin-work-android-ios

thepianist2 commented 3 years ago

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