com.google.android.gms.maps.model.Marker.equals()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中com.google.android.gms.maps.model.Marker.equals()方法的一些代码示例,展示了Marker.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marker.equals()方法的具体详情如下:
包路径:com.google.android.gms.maps.model.Marker
类名称:Marker
方法名:equals

Marker.equals介绍

暂无

代码示例

代码示例来源:origin: googlemaps/android-maps-utils

@Override
public boolean equals(Object other) {
  if (other instanceof MarkerWithPosition) {
    return marker.equals(((MarkerWithPosition) other).marker);
  }
  return false;
}

代码示例来源:origin: googlemaps/android-samples

@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;
  }
}

代码示例来源:origin: googlemaps/android-samples

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 {

代码示例来源:origin: googlemaps/android-samples

@Override
public boolean onMarkerClick(final Marker marker) {
  if (marker.equals(mPerth)) {
  } else if (marker.equals(mAdelaide)) {

代码示例来源:origin: googlemaps/android-samples

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;
}

代码示例来源:origin: wiglenet/wigle-wifi-wardriving

@Override
public boolean equals(Object other) {
  if (other instanceof MarkerWithPosition) {
    return marker.equals(((MarkerWithPosition) other).marker);
  }
  return false;
}

代码示例来源:origin: car2go/AnyMaps

@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);
}

代码示例来源:origin: aaronhe42/RxGoogleMapsBinding

@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);
}

代码示例来源:origin: mg6maciej/android-maps-extensions

@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;
}

代码示例来源:origin: ac-opensource/MarkerBuilder

if (marker.equals(centerMarker)) {
  onCenterUpdated(marker.getPosition());
  return MarkerMoveResult.moved;
if (marker.equals(resizerMarker)) {
  double newRadius = MarkerAreasUtils.toRadiusMeters(centerMarker.getPosition(), marker.getPosition());

代码示例来源:origin: SkyTreasure/Airbnb-Android-Google-Map-View

if (!marker.equals(prevMarker)) {

代码示例来源:origin: SkyTreasure/Airbnb-Android-Google-Map-View

if (!marker.equals(prevMarker)) {

相关文章