Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid onMarkerClick doesn't call after InfoWindow hiding in GoogleMap Google Maps Android API v2
    primarykey
    data
    text
    <p>I integrate Google Maps Android API v2 into my app and have strange behavior with markers in GoogleMap. OnMarkerClickListener#onMarkerClick(Marker marker) is not called after InfoWindow hiding. It doesn't depend on how I show InfoWindow (neither <strong>marker.showInfoWindow()</strong> nor </p> <pre><code>@Override public boolean onMarkerClick(final Marker marker) { ..... return true;} </code></pre> <p>doesn't work. After i change camera position by touching or change zoom it works one time. The same behavior I saw in GoogleMapDemo.</p> <p>Here is my code</p> <pre><code> private GoogleMap mMap; @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.map_address_activity); setUpMapIfNeeded(); // from oficial sample mMap.setOnMapClickListener(new OnMapClickListener() { @Override public void onMapClick(LatLng point) { mMap.clear(); mMap.addMarker(new MarkerOptions().position(point).title("Marker")); final CameraPosition cameraPosition = new CameraPosition.Builder().target(point).zoom(mMap.getCameraPosition().zoom).build(); mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); }); mMap.setOnMarkerClickListener(new OnMarkerClickListener() { @Override public boolean onMarkerClick(final Marker marker) { Log.e("TESTING", "on Marker click: " + marker.getTitle()); if (!marker.isInfoWindowShown()) marker.showInfoWindow(); else marker.hideInfoWindow(); return true; } }); } </code></pre> <p>Can you help me to handle click events on marker after hiding InfoWindow?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload