Java 类com.baidu.mapapi.map.BaiduMapOptions 实例源码

项目:BikeHelper    文件:MainActivity.java   
private void setMapView() {
    BaiduMapOptions options = new BaiduMapOptions();
    options.compassEnabled(false);
    options.overlookingGesturesEnabled(false);
    options.rotateGesturesEnabled(false);
    options.scaleControlEnabled(true);
    options.zoomControlsEnabled(false);
    MapStatus.Builder status = new MapStatus.Builder();
    if (Config.Zoom > Float.NEGATIVE_INFINITY)
        status.zoom(Config.Zoom);
    if (Config.Latitude > Double.NEGATIVE_INFINITY && Config.Longitude > Double.NEGATIVE_INFINITY)
        status.target(new LatLng(Config.Latitude, Config.Longitude));
    options.mapStatus(status.build());
    mMapView = new MapView(this, options);

    mMapView.getMap().setMyLocationEnabled(true);
    mMapView.getMap().setBuildingsEnabled(false);
    mMapView.getMap().setOnMapStatusChangeListener(this);

    MapViewUtils.initViewPositions(mMapView);
    MapViewUtils.addMapView(this, mMapView);
}
项目:BikeHelper    文件:RouteViewActivity.java   
private void setMapView() {
    BaiduMapOptions options = new BaiduMapOptions();
    options.compassEnabled(false);
    options.overlookingGesturesEnabled(false);
    options.rotateGesturesEnabled(false);
    options.scaleControlEnabled(true);
    options.zoomControlsEnabled(false);
    mMapView = new MapView(this, options);

    mMapView.getMap().setBuildingsEnabled(false);
    mMapView.getMap().setMapType(Config.MapType);

    MapViewUtils.initViewPositions(mMapView, false);
    MapViewUtils.addMapView(this, mMapView);
    MapViewUtils.addLineOverlay(mMapView, mRoutePoints, 0);
    MapViewUtils.addDrawableOverlay(mMapView, R.drawable.ic_route_start, mRouteData.getBeginLatlng(), 2);
    MapViewUtils.addDrawableOverlay(mMapView, R.drawable.ic_route_end, mRouteData.getEndLatlng(), 1);
    MapViewUtils.zoomToMaxLevel(mMapView, false);
    MapViewUtils.moveToLatLng(mMapView, mRouteData.getBeginLatlng(), false);
}
项目:BikeHelper    文件:MainActivity.java   
private void setMapView() {
    BaiduMapOptions options = new BaiduMapOptions();
    options.compassEnabled(false);
    options.overlookingGesturesEnabled(false);
    options.rotateGesturesEnabled(false);
    options.scaleControlEnabled(true);
    options.zoomControlsEnabled(false);
    MapStatus.Builder status = new MapStatus.Builder();
    if (Config.Zoom > Float.NEGATIVE_INFINITY)
        status.zoom(Config.Zoom);
    if (Config.Latitude > Double.NEGATIVE_INFINITY && Config.Longitude > Double.NEGATIVE_INFINITY)
        status.target(new LatLng(Config.Latitude, Config.Longitude));
    options.mapStatus(status.build());
    mMapView = new MapView(this, options);

    mMapView.getMap().setMyLocationEnabled(true);
    mMapView.getMap().setBuildingsEnabled(false);
    mMapView.getMap().setOnMapStatusChangeListener(this);

    MapViewUtils.initViewPositions(mMapView);
    MapViewUtils.addMapView(this, mMapView);
}
项目:BikeHelper    文件:RouteViewActivity.java   
private void setMapView() {
    BaiduMapOptions options = new BaiduMapOptions();
    options.compassEnabled(false);
    options.overlookingGesturesEnabled(false);
    options.rotateGesturesEnabled(false);
    options.scaleControlEnabled(true);
    options.zoomControlsEnabled(false);
    mMapView = new MapView(this, options);

    mMapView.getMap().setBuildingsEnabled(false);
    mMapView.getMap().setMapType(Config.MapType);

    MapViewUtils.initViewPositions(mMapView, false);
    MapViewUtils.addMapView(this, mMapView);
    MapViewUtils.addLineOverlay(mMapView, mRoutePoints, 0);
    MapViewUtils.addDrawableOverlay(mMapView, R.drawable.ic_route_start, mRouteData.getBeginLatlng(), 2);
    MapViewUtils.addDrawableOverlay(mMapView, R.drawable.ic_route_end, mRouteData.getEndLatlng(), 1);
    MapViewUtils.zoomToMaxLevel(mMapView, false);
    MapViewUtils.moveToLatLng(mMapView, mRouteData.getBeginLatlng(), false);
}
项目:MockLocations    文件:MainActivity.java   
/**
 * 初始化地图部分
 * 设置不显示地图缩放控件,比例尺控件
 * 设置地图初始化中心点
 *
 * @param options
 */
@Override
public void configBaiduMap(BaiduMapOptions options) {

    mMapView = new MapView(this, options);
    RelativeLayout.LayoutParams params_map = new RelativeLayout.LayoutParams(
            RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
    mapRoot.addView(mMapView, params_map);
    mBaiduMap = mMapView.getMap();
}
项目:MockLocations    文件:MainPresenter.java   
public void configBaiduMap() {
    BaiduMapOptions options = new BaiduMapOptions();
    options.zoomControlsEnabled(false);
    options.scaleControlEnabled(false);
    options.rotateGesturesEnabled(false);
    mainView.configBaiduMap(options);
}
项目:Mooc-map    文件:MapFragment.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_fragment);
    MapStatus ms = new MapStatus.Builder().overlook(-20).zoom(15).build();
    BaiduMapOptions bo = new BaiduMapOptions().mapStatus(ms);
    map = SupportMapFragment.newInstance(bo);
    FragmentManager manager = getSupportFragmentManager();
    manager.beginTransaction().add(R.id.map, map, "map_fragment").commit();
}
项目:PiBoat    文件:SmallBaiduMap.java   
private void initView() {
    /*LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    inflater.inflate(R.layout.small_baidumap, this);*/
    BaiduMapOptions mapOptions = new BaiduMapOptions();
    mapOptions.scaleControlEnabled(false); // 隐藏比例尺控件
    mapOptions.zoomControlsEnabled(false);//
    mMapView = new MapView(context, mapOptions);// 获取地图控件引用
    //mMapView = (MapView) findViewById(R.id.small_bmapView);
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    this.addView(mMapView,params);
    mBaiduMap = mMapView.getMap();
    initMapAndLoc();
}
项目:MockLocations    文件:IMainView.java   
void configBaiduMap(BaiduMapOptions options);