android - Listener to map touch outside of the markers -
i using google map api markers. overrode infowindow below show custom text.
public void setupmap() { final googlemap map = mmapview.getmap(); map.clear(); map.setinfowindowadapter(new googlemap.infowindowadapter() { private view mholder; @override public view getinfowindow(final marker marker) { log.d("map", "map clicked on marker = " + maker); etc....
this works fine , change icon of each marker when clicked making them visually selected. however, want "unselect" markers. problem don't know how add listener gets triggered outside of markers.
in other words, listener "getinfowindow" gets trigger when marker touched. want opposite. sort of listener tells me user touched map not markers.
can done easily? pointers appreciated.
thx!
ok, suppose that's easy.
have onmarkerclicklistener
, onmapclicklistener
.
so, in case register onmapclicklistener
, in onmapclick()
can need.
one more thing - when add markers, store them in arraylist
- @ time can whatever needed - remove markers map.
Comments
Post a Comment