本文整理汇总了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);
}
开发者ID:iWay7,项目名称:BikeHelper,代码行数:23,代码来源:MainActivity.java
示例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);
}
开发者ID:iWay7,项目名称:BikeHelper,代码行数:21,代码来源:RouteViewActivity.java
示例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();
}
开发者ID:lulee007,项目名称:MockLocations,代码行数:17,代码来源:MainActivity.java
示例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);
}
开发者ID:lulee007,项目名称:MockLocations,代码行数:8,代码来源:MainPresenter.java
示例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();
}
开发者ID:PengZhiPeng,项目名称:Mooc-map,代码行数:11,代码来源:MapFragment.java
示例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();
}
开发者ID:offbye,项目名称:PiBoat,代码行数:14,代码来源:SmallBaiduMap.java
示例7: configBaiduMap
import com.baidu.mapapi.map.BaiduMapOptions; //导入依赖的package包/类
void configBaiduMap(BaiduMapOptions options);
开发者ID:lulee007,项目名称:MockLocations,代码行数:2,代码来源:IMainView.java
注:本文中的com.baidu.mapapi.map.BaiduMapOptions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论