当前位置: 首页>>代码示例>>Java>>正文


Java BMapManager类代码示例

本文整理汇总了Java中com.baidu.mapapi.BMapManager的典型用法代码示例。如果您正苦于以下问题:Java BMapManager类的具体用法?Java BMapManager怎么用?Java BMapManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BMapManager类属于com.baidu.mapapi包,在下文中一共展示了BMapManager类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeSureInitBMapManager

import com.baidu.mapapi.BMapManager; //导入依赖的package包/类
private BMapManager makeSureInitBMapManager() {
	if (this.bMapManager == null) {
		this.bMapManager = new BMapManager(this);
		this.bMapManager.init(null);
	}
	return this.bMapManager;
}
 
开发者ID:AfirSraftGarrier,项目名称:ACCAndroid,代码行数:8,代码来源:BaseBaiduMapApplication.java

示例2: onCreate

import com.baidu.mapapi.BMapManager; //导入依赖的package包/类
protected void onCreate(Bundle savedInstanceState)
{
	GoogleApplication app = (GoogleApplication) this.getApplication();
	if (app.mBMapManager == null)
	{
		app.mBMapManager = new BMapManager(getApplicationContext());
		app.mBMapManager.init(new GoogleApplication.MyGeneralListener());
	}
	mBMapManager = app.mBMapManager;
	mLocationClient = new LocationClient(getApplicationContext());
	mLocationClient.registerLocationListener(new BDLocationListenerImpl());
	// 默认经纬度为苏州
	mLocationData.latitude = SUZHOU_LATITUDE;
	mLocationData.longitude = SUZHOU_LONGITUDE;
	mStartGeoPoint = new GeoPoint((int) (mLocationData.latitude * 1E6), (int) (mLocationData.longitude * 1E6));
	super.onCreate(savedInstanceState);
	customActionBar();
	setContentView(R.layout.activity_location);// TODO
	initView();
	initMapView();
	initLocationClient();
	initMKSearch();
	startRequestLocation();
	setListener();
	mMapController.animateTo(mStartGeoPoint);

}
 
开发者ID:haikuowuya,项目名称:like_googleplus_layout,代码行数:28,代码来源:LocationActivity.java

示例3: onCreate

import com.baidu.mapapi.BMapManager; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	this.setMAP_API_KET(Utils.getMetaValue(getApplication(), "map_api_key"));
	mBMapMan = new BMapManager(getApplication());
	mBMapMan.init(MAP_API_KET, null);
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:9,代码来源:MapActivity.java

示例4: onCreate

import com.baidu.mapapi.BMapManager; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Must be initialized before setContentView
    mBMapMan = new BMapManager(getApplication());
    mBMapMan.init(BAIDU_MAPS_KEY, this);

    setContentView(R.layout.venue_activity);

    initSearchText();
    initActionBar();

    mMapView = (MapView) findViewById(R.id.mapView);
    mMapView.setBuiltInZoomControls(ZOOM_CONTROLS_ENABLED);

    MapController mMapController = mMapView.getController();
    mMapController.setCenter(DEFAULT_LOCATION_BEIJING);
    mMapController.setZoom(DEFAULT_ZOOM_LEVEL);

    if (getIntent().getExtras() != null) {

        final String shareId = getIntent().getExtras().getString("shareId");

        mShare = ReadShare.requestShare(shareId, this);
    } else {
        mShare = WriteShare.initNewShare();
    }

    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    mFragment = VenueListFragment.newInstance();
    ft.replace(R.id.venueFragmentContainer, mFragment);
    ft.commit();

    setupLocationClient();
    setupLocationManager();
    // Tiananmen Square coords
    mSearchHelper = new VenueSearchHelper(mFragment, 39.915, 116.404);
}
 
开发者ID:cuipengpeng,项目名称:p1-android,代码行数:40,代码来源:VenueActivity.java

示例5: initMapManager

import com.baidu.mapapi.BMapManager; //导入依赖的package包/类
/**
 * 初始化地图管理器,注意:请在试用setContentView前初始化BMapManager对象,否则会报错
 */
private void initMapManager() {
    mBMapMan = new BMapManager(getApplication());
    if(!mBMapMan.init(AppConfig.BAIDU_API_KEY, new MyGeneralListener())) {
        KLog.w(TAG, "BMapManager init faild!");
        if(AppConfig.DEBUG) {
            SmartToast.showLongToast(this, R.string.hint_init_faild, false);
        }
    }
}
 
开发者ID:alexcaisenchuan,项目名称:FunWeibo,代码行数:13,代码来源:BaiduMapActivity.java

示例6: BaiduMapManager

import com.baidu.mapapi.BMapManager; //导入依赖的package包/类
public BaiduMapManager(Activity activity, BMapManager bMapManager,
		Integer defaultZoom, GeoPoint defaultCenterGeoPoint) {
	this.initMapView(activity, bMapManager, defaultZoom,
			defaultCenterGeoPoint);
}
 
开发者ID:AfirSraftGarrier,项目名称:ACCAndroid,代码行数:6,代码来源:BaiduMapManager.java

示例7: getBMapManager

import com.baidu.mapapi.BMapManager; //导入依赖的package包/类
public BMapManager getBMapManager() {
	return this.makeSureInitBMapManager();
}
 
开发者ID:AfirSraftGarrier,项目名称:ACCAndroid,代码行数:4,代码来源:BaseBaiduMapApplication.java

示例8: onCreate

import com.baidu.mapapi.BMapManager; //导入依赖的package包/类
@Override  
public void onCreate(Bundle savedInstanceState){  
	
	app = (GateApplication)getApplication();
	mk = app.mk;
 prefix = app.prefix ;
	
    super.onCreate(savedInstanceState);  

    app.mBMapMan = new BMapManager(getApplication());
    app.mBMapMan.init(mk, null);
    getLoc();

    setContentView(R.layout.activity_main);  
    
    mapView();
    addUserOverlay();
    
    // 做Button 监听
    Button btnCommit = (Button) findViewById(R.id.CommitButton);
    
    Switch sw = (Switch)findViewById(R.id.swt);
    sw.setChecked(isWork());
    sw.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {  
        @Override  
        public void onCheckedChanged(CompoundButton buttonView,  
                boolean isChecked) {  
            Toast.makeText(MapActivity.this, isChecked + "",  
                    Toast.LENGTH_SHORT).show();  

            HttpFunc web = new HttpFunc();
            String url = prefix + "changeDriver.php?id=" + app.id + "&type=";
            if(isChecked == true)
            	url = url + "1";
            else
            	url = url + "0";
            web.execute(url); 
        }
    });
    new Thread(new Update()).start();
}
 
开发者ID:townboy,项目名称:calltaxi,代码行数:42,代码来源:MapActivity.java


注:本文中的com.baidu.mapapi.BMapManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。