joshdeng / osmbonuspack

Automatically exported from code.google.com/p/osmbonuspack
1 stars 0 forks source link

InfoWindow not removed with FolderOverlay #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Parse a KML file using KmlDocument and create a FolderOverlay.
2. Add the FolderOverlay to a MapView.
3. Click an icon from the FolderOverlay - an InfoWindow appears.
4. Remove the FolderOverlay from the MapView.

What is the expected output? What do you see instead?

I expect the InfoWindow to be removed from the MapView along with the 
FolderOverlay. 
Instead the FolderOverlay is removed but the InfoWindow remains visible.

What version of the products are you using (Android SDK, osmdroid,
OSMBonusPack)?

I am using android api 17 with the latest versions of both OSMDroid and 
OSMBonusPack.

Please provide any additional information below.

Original issue reported on code.google.com by warwo...@gmail.com on 13 Nov 2014 at 1:43

GoogleCodeExporter commented 9 years ago
This is a general issue about InfoWindows. 
From my point of view, this is not a big issue, just annoying. 

A simple workaround: when you remove the FolderOverlay, you could call 
InfoWindow.closeAllInfoWindowsOn(mapview) to close all opened bubbles. 

The alternative is to parse all overlays to be removed, and call 
OverlayWithIW.hideInfoWindow(). 
A good solution should be to provide that feature as a 
FolderOverlay.hideAllInfoWindows() method => I will plan that in the next 
release. 

Original comment by mathieu....@gmail.com on 13 Nov 2014 at 1:19

GoogleCodeExporter commented 9 years ago
Great, closing the InfoWindow with InfoWindow.closeAllInfoWindowsOn(mMapView); 
is all i needed to do.

Thanks.

Original comment by warwo...@gmail.com on 13 Nov 2014 at 1:30

GoogleCodeExporter commented 9 years ago
FolderOverlay.closeAllInfoWindows() now added in v5.0. 

Original comment by mathieu....@gmail.com on 21 Nov 2014 at 8:53