Question

I want to hide the overlay item window popup after click on the mapview. Currently when i click on the balloon then popup window comes. if i tap on other ballon then previous ballon pop up window hide and new pop up window comes on that ballon. this is correct. But I have a problem to hide that pop up on the mapview click/Touch. Please share the solution.

Was it helpful?

Solution

To resolve this firstly you have to take static variable in the MapActivity.

e.g public static isMapRefreshed = false;

Then goto BalloonItemizedOverlay class there is a draw method there. write following code there to resolve this.

private BalloonOverlayView balloonView;

if(UsersNearMe.isMapRefreshed){ hideBalloon(); }

private void hideBalloon() { if (balloonView != null) { balloonView.setVisibility(View.GONE); } }

on mapview clicklistener change the static value for the isMapRefreshed to true. and on tap change the static value for the isMapRefreshed to false

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top