Hi.
couldn’t solve webview problem with map on android On the web it works fine, but when I generate the apk and test it doesn’t work
this is what i have
export class HomePage implements OnInit {
@ViewChild('mapRef')
mapRef: ElementRef<HTMLElement>;
newMap: GoogleMap;
ngOnInit() {
setTimeout(() => {
alert('yooo');
alert(`mapref ${JSON.stringify(this.mapRef)}`);
this.createMap();
}, 500);
}
async createMap() {
this.newMap = await GoogleMap.create({
id: 'my-cool-map',
element: this.mapRef.nativeElement,
apiKey: environment.GOOGLE_MAPS_API_KEY,
config: {
center: {
lat: 33.6,
lng: -117.9,
},
zoom: 8,
},
});
}
}
<ion-content [fullscreen]="true">
<h1>9</h1>
<div id="container">
<capacitor-google-map #mapRef></capacitor-google-map>
</div>
</ion-content>
.md {
ion-content {
--background: transparent !important;
}
}
global scss
```css
.md ion-content {
--background: transparent !important;
}
.md body {
--background: transparent !important;
background: transparent !important;
}
body {
background: transparent !important;
}
ion-content {
--background: transparent !important;
}
expected result (web)
current result(android)
any ideas?
I think im gonna use @ionic-native/google-maps or other similar library to show maps:/