mapsplugin / cordova-plugin-googlemaps

Google Maps plugin for Cordova
Apache License 2.0
1.66k stars 914 forks source link

Incomplete removal of map on Android 2.x.x #260

Closed DimaRGB closed 9 years ago

DimaRGB commented 9 years ago

https://www.youtube.com/watch?v=H_c18__ZojM

When i go on map screen, map init: plugin.google.maps.Map.getMap(options); and then

map.isAvailable(function () {
    map.setDiv(div);
});

When i go out of map screen: map.remove();

But as if stay the screenshot of menu on map view.

I use angular framework.

wf9a5m75 commented 9 years ago

Thank you for your report. And the video is really helpful to confirm the issue :+1:

Do you use the map plugin v1.2.2? Because there was some bugs similar this case in v1.2.1. If so, please try the v1.2.2.

If you use v1.2.2, could you turn on the debug mode? Just add the code map.setDebuggable( true ). Then could you take a video again?

okodynets commented 9 years ago

Hi Masashi!

Thanks a lot for your plugin, for your answers and trying to help!

We still have a big problem with our navigation menu and the map on Android 2.х and even Android 4.2.2. Basically only Android 4.4.4 and iOS works fine :(

Everything works fine when we go to maps first time after the application is started. Then we go to some other page, again back to maps and there it is - we see like a screenshot of the menu over the map. What is interestingly - the map responds to the touches even on the screenshot (like it is a part of the Google Map).

Yes, we use v1.2.2. Ok, we added the code map.setDebuggable( true ). Here is the video for Android 4.2.2 device: http://youtu.be/gDeULbivv80

We spent a lot of time to find a workaround for this issue but still have no progress. Hope for your help.

wf9a5m75 commented 9 years ago

Um. I'm not sure why the plugin does not recognize the children regions. Could you insert map.refreshLayout() after the side menu is opened & closed. Also call the map.remove() after the map page is closed.

michaeleparkour commented 9 years ago

I can confirm on Android 4.4.4 and v1.2.2 that map become invisible after change page and reacts on touches. Offcourse map.remove() fix problem. But there was no this behaviour in test branch (about a week age) I used earlier.

okodynets commented 9 years ago

We do exactly what you wrote. Here is one more video: http://youtu.be/sHIbmUyWnw8 You can see here that when menu is closing and map.remove() is called a screenshot of the menu appears over the map. And when map is opened again this screenshot is a part of the map - instead of google maps (not div). Android 4.2.2.

wf9a5m75 commented 9 years ago

Um, I will check this on Android 2.3.4. Just a wait. Sorry for inconvenience.

okodynets commented 9 years ago

Here is another observation. In demo application it seems that the main view is static while the menu appears over the entire application. In our application there is a static menu placed under the main view. And when menu is opening we move the main view to the right. But we got a bug with screenshoting menu...

wf9a5m75 commented 9 years ago

Under the menubar is not available currently. Because the map plugin changes the background as transparent.

On Fri, Oct 24, 2014, 3:10 AM Oleg notifications@github.com wrote:

Here is another observation. In demo application it seems that the main view is static while the menu appears over the entire application. In our application there is a static menu placed under the main view. And when menu is opening we move the main view to the right. But we got a bug with screenshoting menu...

— Reply to this email directly or view it on GitHub https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/260#issuecomment-60368490 .

wf9a5m75 commented 9 years ago

Hi, I changed some code to work this plugin well on Android 2.3. Install from the test branch.

$> cordova plugin add https://github.com/wf9a5m75/phonegap-googlemaps-plugin#test --variable API_KEY_FOR_ANDROID=... --variable API_KEY_FOR_IOS=...

The demo video is here http://youtu.be/FKxaGjTOCkg

And the demo apk is here. https://googledrive.com/host/0B1ECfqTCcLE8TXlUQUJXMmJpNGs/issue260_demo1.apk

The demo code is here. https://github.com/wf9a5m75/issue_260

okodynets commented 9 years ago

Hi! We'll check some more, but it seems everything is ok now. Thanks a lot! Really surprised to see fixed bug in such a short time :) Have a nice day!

wf9a5m75 commented 9 years ago

Sounds good!