ionic-team / ionic-team/capacitor-google-maps

Google Map disappearing when updating the DOM

Open
#133 1 comment 0 reactions 0 assignees View on GitHub
documentation
Dominant language
TypeScript
Stars
32
Forks
47
PR merge metrics
No merged PRs in 30d

Description

## Bug Report

I finally found out why the map disappeared after some time on iOS. It seems to be related to dynamically adding a new element to the page where the map is created. Could someone explain why would that happen? Would the map binding break or how can this be avoided?

### Plugin(s)

Google Maps

### Capacitor Version

```
💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.1.0
@capacitor/core: 6.1.0
@capacitor/android: 6.1.0
@capacitor/ios: 6.1.0

Installed Dependencies:

@capacitor/android: not installed
@capacitor/cli: 5.0.0
@capacitor/core: 5.1.1
@capacitor/ios: 5.0.0
```

### Platform(s)

iOS

### Current Behavior

The map disappears on iOS, seemingly related to dynamically adding a new element to the page where the map is created.

### Expected Behavior

The map should remain visible and functional even after dynamically adding new elements to the page.

### Code Reproduction

any example based on ionic angular, having a div with ngIf that is enabled after the map is initialized

### Other Technical Details

### Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.