use of com.baidu.mapapi.map.MapStatusUpdate in project wechat by motianhuo.
the class BaiduMapActivity method showMap.
private void showMap(double latitude, double longtitude, String address) {
txt_right.setVisibility(View.GONE);
LatLng llA = new LatLng(latitude, longtitude);
CoordinateConverter converter = new CoordinateConverter();
converter.coord(llA);
converter.from(CoordinateConverter.CoordType.COMMON);
LatLng convertLatLng = converter.convert();
OverlayOptions ooA = new MarkerOptions().position(convertLatLng).icon(BitmapDescriptorFactory.fromResource(R.drawable.icon_marka)).zIndex(4).draggable(true);
mBaiduMap.addOverlay(ooA);
MapStatusUpdate u = MapStatusUpdateFactory.newLatLngZoom(convertLatLng, 17.0f);
mBaiduMap.animateMapStatus(u);
}
use of com.baidu.mapapi.map.MapStatusUpdate in project PhotoNoter by yydcdut.
the class MapPresenterImpl method initBaiduMap.
private void initBaiduMap() {
mBaiduMap = mIMapView.getBaiduMap();
// 获取地图对象控制器
// 设置显示楼体
mBaiduMap.setBuildingsEnabled(true);
// 设置地图状态
mBaiduMap.setMapStatus(MapStatusUpdateFactory.zoomTo(19f));
mUiSettings = mBaiduMap.getUiSettings();
mUiSettings.setZoomGesturesEnabled(true);
mUiSettings.setScrollGesturesEnabled(true);
mUiSettings.setRotateGesturesEnabled(true);
mUiSettings.setOverlookingGesturesEnabled(true);
mUiSettings.setCompassEnabled(true);
MapStatus ms = new MapStatus.Builder().overlook(30).build();
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
mBaiduMap.animateMapStatus(u, 1000);
// 初始化搜索模块
mSearch = GeoCoder.newInstance();
mSearch.setOnGetGeoCodeResultListener(this);
}
Aggregations