本文整理汇总了Java中com.baidu.mapapi.map.BaiduMapOptions类的典型用法代码示例。如果您正苦于以下问题:Java BaiduMapOptions类的具体用法?Java BaiduMapOptions怎么用?Java BaiduMapOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaiduMapOptions类属于com.baidu.mapapi.map包,在下文中一共展示了BaiduMapOptions类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setMapView
import com.baidu.mapapi.map.BaiduMapOptions; //导入依赖的package包/类
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);
}
示例2: setMapView
import com.baidu.mapapi.map.BaiduMapOptions; //导入依赖的package包/类
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);
}
示例3: configBaiduMap
import com.baidu.mapapi.map.BaiduMapOptions; //导入依赖的package包/类
/**
* 初始化地图部分
* 设置不显示地图缩放控件,比例尺控件
* 设置地图初始化中心点
*
* @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();
}
示例4: configBaiduMap
import com.baidu.mapapi.map.BaiduMapOptions; //导入依赖的package包/类
public void configBaiduMap() {
BaiduMapOptions options = new BaiduMapOptions();
options.zoomControlsEnabled(false);
options.scaleControlEnabled(false);
options.rotateGesturesEnabled(false);
mainView.configBaiduMap(options);
}
示例5: onCreate
import com.baidu.mapapi.map.BaiduMapOptions; //导入依赖的package包/类
@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();
}
示例6: initView
import com.baidu.mapapi.map.BaiduMapOptions; //导入依赖的package包/类
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();
}
示例7: configBaiduMap
import com.baidu.mapapi.map.BaiduMapOptions; //导入依赖的package包/类
void configBaiduMap(BaiduMapOptions options);