ionic-team / capacitor-google-maps

12 stars 16 forks source link

maps shows on page transitions #8

Open medida opened 4 months ago

medida commented 4 months ago

currently using version 5.4.1 "@capacitor/google-maps": "^5.4.1",

I'm using the maps succesfully but i have a few issues with it.

Within my app i have multiple pages and the user can move around to show different data. But after a user has been to a page with a MAP on it and then navigates away to another page which does not have a map, while the page is transitioning the MAP below webview is visible

I have tried to DESTROY the map and i store the google_map in a global variable so i can try and remove it where ever my users go...

But becuase the map is on the below the webview i can never get rid of this shadow of map.

How do other people cope with using the map - but then navigating to other pages which it out it look terrible.

Also when i destroy the map... and then go back to page which has a map - the previous one is still present for a moment with all the old map icons on it.

AE1NS commented 2 months ago

We solved this by creating an 'overlay' container with a filled background color, that will be displayed whenever the page will leave or vice versa. As the native map will not listen to any css transitions, I think there wont be another solution right now.

medida commented 2 months ago

Thanks. I gave up and i'm now running a JS google maps version. I really could not get it to perform as well as I thought it should and i had to get the project done.