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

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

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

Marker.setDraggable介绍

暂无

代码示例

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

public void setDraggable(boolean draggable) {
  if (marker != null) {
    marker.setDraggable(draggable);
  } else {
    markerOptions.draggable(draggable);
  }
}

代码示例来源:origin: GeoODK/collect

private void stopGeolocating() {
  mRefreshLocation = false;
  mReloadLocation.setVisibility(View.VISIBLE);
  mLocationManager.removeUpdates(this);
  mMarker.setDraggable(true);
  mLocationStatus.setVisibility(View.GONE);
}

代码示例来源:origin: GeoODK/collect

@Override
public void onMapLongClick(LatLng latLng) {
  if (mMarker == null) {
    mMarkerOption.position(latLng);
    mMarker = mMap.addMarker(mMarkerOption);
    mShowLocation.setClickable(true);
  } else {
    mMarker.setPosition(latLng);
  }
  mLatLng=latLng;
  mIsDragged = true;
  stopGeolocating();
  mMarker.setDraggable(true);
}

代码示例来源:origin: GeoODK/collect

mMarker = mMap.addMarker(mMarkerOption);
mRefreshLocation = false; // just show this position; don't change it...
mMarker.setDraggable(mCaptureLocation);
mZoomed = true;
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(mLatLng, 16));

相关文章