Maps are not visible in android device - FIXED
rajeshwarpatlolla opened this issue · comments
First of all i would like to thank all the contributors, maintainers of this repo. This package is really helpful.
I'm submitting a ... (check one with "x")
- any problem or bug report
- question
- feature request
If you choose 'problem or bug report', please select OS: (check one with "x")
- Android
- iOS
- Browser
cordova information: (run $> cordova plugin list
)
cordova-androidx-build 1.0.4 "cordova-androidx-build"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-googlemaps 2.8.0-20200709-2008 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
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:
The maps are showing properly in web browser using ionic cordova run browser -l
. But when i run in mobile with debug mode or apk directly installed, it's not showing the maps properly. Except the map i am able to see everything like google credits zoom in, zoom out, my location button etc. It's also giving my current location as well and when i tap on the screen all the related events are also triggered. But the issue is map is not displayed at all.
When i inspect the debug apk using chrome inspect tools, i found that the content on the DOM is not rendering.
Expected behavior:
Maps should be displayed properly in android as well.
Screen capture or video record:
Related code, data or error log (please format your code or data):
I am waiting till the device is ready
async ngOnInit() {
await this.platform.ready();
this.renderMap();
}
Here is my css
#map_canvas {
height: 350px;
}
Here is the complete JS code.
Gray map means always your API key problem.
In Android, this plugin does *not" use Google Maps JavaScript v3. We use Google Maps SDK for Android