androidandroid-mapviewoverlayitem

"Hiding" an OverlayItem in Android , possible?


I am working on a MapView app, and would like to place a nice little easter egg in the program. What I am trying to do is have an overlayitem that is basically invisible, but when tapped will trigger an event to show a view.

Now on the iPhone i accomplished this by using setHidden:true on the annotation I didn't want visible.. the annotation was still there and still was clickable, but you could not see it.

I am trying to find some equivalent method on the overlayItem in Android, but find nothing. Is my only option to accopmlish this to find/create a transparent image and add it as an overlay to the mapView? I can do this if I have to, but are there any other options? And if not can anyone point me to a relatively small transparent image?


Solution

  • I found the easiest solution was to just use an invisible drawable and add it as an overlayitem, so this is what I did and it works as expected.