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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -