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:
- the info window corresponding clicked marker shown.
- the camera pans marker.
the above can achieved 2 lines of code:
marker.showinfowindow(); map.animatecamera(cameraupdatefactory.newlatlng(marker.getposition()), 250, null);
Comments
Post a Comment