本文主要是介绍Android高德地图拖动选点,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
private AMap.OnCameraChangeListener mapChangedListener = new AMap.OnCameraChangeListener() {@Overridepublic void onCameraChange(CameraPosition cameraPosition) {// 添加当前坐标覆盖物if (mMarkerOption == null) {mMarkerOption = new MarkerOptions().icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)).position(cameraPosition.target).draggable(true);marker = aMap.addMarker(mMarkerOption);} else {marker.setPosition(cameraPosition.target);}}@Overridepublic void onCameraChangeFinish(CameraPosition cameraPosition) {LatLng mapCenterPoint = getMapCenterPoint();lat = mapCenterPoint.latitude;lng = mapCenterPoint.longitude;LatLonPoint latLonPoint = new LatLonPoint(WorkSpaceActivity.this.lat, lng);getAddressByLatlng(latLonPoint);}};
这篇关于Android高德地图拖动选点的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!