The onInfoWindowCLick said that it is never used. Please help me
public class MapsActivity extends FragmentActivity {
private GoogleMap mMap; // Might be null if Google Play services APK is not available.
private Map<Marker, Class> allMarkersMap = new HashMap<Marker, Class>;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Marker marker1 = mMap.addMarker(new MarkerOptions()
.position(new LatLng(0, -0))
.title("Netherlands")
.snippet("Amsterdam"));
allMarkersMap.put(marker1, MainActivity.class);
public void onInfoWindowClick(Marker marker1) {
Class cls = allMarkersMap.get(marker1);
Intent intent = new Intent(MapsActivity.this, cls);
startActivity(intent);
}
}