How to trigger the onClick event of a marker on a Google Maps V2 for Android? -


is there way of calling onclick event of specific marker manually (without physically tapping marker)?

no, but can simulate onclick event. 2 things happen when click marker:

  1. the info window corresponding clicked marker shown.
  2. the camera pans marker.

the above can achieved 2 lines of code:

marker.showinfowindow(); map.animatecamera(cameraupdatefactory.newlatlng(marker.getposition()), 250, null); 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -