Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map in iOS hidden in some cases #23

Open
AE1NS opened this issue Jun 18, 2024 · 1 comment · May be fixed by #24
Open

Map in iOS hidden in some cases #23

AE1NS opened this issue Jun 18, 2024 · 1 comment · May be fixed by #24
Labels

Comments

@AE1NS
Copy link

AE1NS commented Jun 18, 2024

Bug Report

Plugin(s)

@capacitor/google-maps

Description

Some time ago I refactored the updateRender method. Afterwards some more changes were made in the getTargetContainer method in iOS. This makes trouble, when the map size changes.

let isWidthEqual = width == self.config.width
let isHeightEqual = actualHeight == self.config.height

This result in the following error: The map gets loaded on page enter. Now, in our case, we change the map size with dragging up a bottom sheet, so the map size changes. When you now leave the page forward and come back (we use ionic for this), the onDisplay method will be triggered, but will not find the map container, as still checks the inital values coming from self.config. The map will now not be shown again and is hidden.
There is als another issue with the variable actualHeight, where the value gets ceiled in some cases in our app, which also will not trigger to show the map again, as the target container is not found, because the height differs by 1px.
And we have issues with some iOS devices that are crashing, because the gmapview is null because the target container couldnt be found (1px differ issue).

Platform(s)

iOS

@wahibimoh
Copy link

I am noticing a similar issue, when rotating the screen in iOS, the map is blank.
I tried the fix in pull request #24 but the issue is still there.

Is there any way we can make the map behave like in Android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants