Describe the bug
The map doesn't resize and is stuck at the top of screen, hiding the underneath content. Is not removed when changing tab, even though .destroy is implemented.
.... code continues...
**tab1.page.scss**
.map-container{
text-align: center;
color: plum;
}
capacitor-google-map {
display: inline-block;
height: 50%;
width: 100%;
}
**Expected behavior**
be able to resize based on css
not to be stuck at top
to be able to remove map when changing tab
**Screenshots**
![IMG_67D4460A435E-2](https://user-images.githubusercontent.com/16851521/221376575-35ce50e0-28af-4a50-81be-47d0c3f63065.jpeg)
![IMG_67D4460A435E-1](https://user-images.githubusercontent.com/16851521/221376579-13d51880-8d87-4f1c-97b9-fa35a2c57786.jpeg)
Describe the bug The map doesn't resize and is stuck at the top of screen, hiding the underneath content. Is not removed when changing tab, even though .destroy is implemented.
iOS 16.3.1
code: tab1.page.ts
tried both of these
ngOnInit(){ this.mapservice.createMap(this.mapView); }
ionViewDidEnter() { this.mapservice.createMap(this.mapView);
}
mapservice.service.ts async createMap(element: ElementRef) { this.newMap = await GoogleMap.create({ id: 'map', element: element.nativeElement, apiKey: this.key, config: { center: { lat: 58, lng: 18, }, zoom: 10, }, });
}
destroy() {
tried both of these
}
tab1.page.html <ion-header [translucent]="true">
Date: {{date}}
Your longitude is: {{mapservice.long}}
Your latitude is: {{mapservice.lat}}