I am adding a marker to my map. Simultaneously showing the marker info. But i want to simulate a click event on my marker, so the google-maps-options /icons (calculate route and open google maps) are display on the screen.
public void onMapReady(GoogleMap googleMap) {
final int randomKey = new Random().nextInt(MainActivity.randomDestination.size());
map = googleMap;
Destination selectedDest = MainActivity.randomDestination.get(randomKey);
Marker marker = map.addMarker(new MarkerOptions().position(selectedDest.getLatLng()).title(selectedDest.getName()));
marker.showInfoWindow();
map.moveCamera(CameraUpdateFactory.newLatLng(selectedDest.getLatLng()));
}
public class Destination {
private String name;
private LatLng latLng;
Destination(String name, LatLng latLng){
this.name = name;
this.latLng = latLng;
}
public String getName(){return name;};
public LatLng getLatLng(){return latLng;};
}