@Override public boolean equals(Object other) { if (other instanceof MarkerWithPosition) { return marker.equals(((MarkerWithPosition) other).marker); } return false; }
@Override public boolean onMarkerClick(final Marker marker) { // The user has re-tapped on the marker which was already showing an info window. if (marker.equals(mSelectedMarker)) { // The showing info window has already been closed - that's the first thing to happen // when any marker is clicked. // Return true to indicate we have consumed the event and that we do not want the // the default behavior to occur (which is for the camera to move such that the // marker is centered and for the marker's info window to open, if it has one). mSelectedMarker = null; return true; } mSelectedMarker = marker; // Return false to indicate that we have not consumed the event and that we wish // for the default behavior to occur. return false; } }
private void render(Marker marker, View view) { int badge; if (marker.equals(mBrisbane)) { badge = R.drawable.badge_qld; } else if (marker.equals(mAdelaide)) { badge = R.drawable.badge_sa; } else if (marker.equals(mSydney)) { badge = R.drawable.badge_nsw; } else if (marker.equals(mMelbourne)) { badge = R.drawable.badge_victoria; } else if (marker.equals(mPerth)) { badge = R.drawable.badge_wa; } else if (marker.equals(mDarwin1)) { badge = R.drawable.badge_nt; } else if (marker.equals(mDarwin2)) { badge = R.drawable.badge_nt; } else if (marker.equals(mDarwin3)) { badge = R.drawable.badge_nt; } else if (marker.equals(mDarwin4)) { badge = R.drawable.badge_nt; } else {
public boolean onMarkerMoved(Marker marker) { if (marker.equals(mCenterMarker)) { mCircle.setCenter(marker.getPosition()); mRadiusMarker.setPosition(toRadiusLatLng(marker.getPosition(), mRadiusMeters)); return true; } if (marker.equals(mRadiusMarker)) { mRadiusMeters = toRadiusMeters(mCenterMarker.getPosition(), mRadiusMarker.getPosition()); mCircle.setRadius(mRadiusMeters); return true; } return false; }
@Override public boolean equals(Object other) { if (other instanceof MarkerWithPosition) { return marker.equals(((MarkerWithPosition) other).marker); } return false; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof MarkerAdapter)) return false; MarkerAdapter that = (MarkerAdapter) o; return marker.equals(that.marker); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MarkerDragEvent that = (MarkerDragEvent) o; if (kind != that.kind) return false; return marker.equals(that.marker); }
@Override public Marker map(com.google.android.gms.maps.model.Marker original) { for (ClusterMarker cluster : clusters.values()) { if (original.equals(cluster.getVirtual())) { return cluster; } } return null; }
if (!marker.equals(prevMarker)) {
if (!marker.equals(prevMarker)) {