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


Java MapPoi类代码示例

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


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

示例1: onClickMapPoi

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
public void onClickMapPoi(MapPoi poi)
{
	if (null != poi)
	{
		mEndGeoPoint = new GeoPoint(poi.geoPt.getLatitudeE6(), poi.geoPt.getLongitudeE6());
		LocationData clickLocationData = new LocationData();
		clickLocationData.latitude = poi.geoPt.getLatitudeE6() / 1000000.0;
		clickLocationData.longitude = poi.geoPt.getLongitudeE6() / 1000000.0;
		mClickLocationOverlay.setData(clickLocationData);
		mClickLocationOverlay.setMarker(getResources().getDrawable(R.drawable.ic_nav_turn_start_s));
		mMapView.getOverlays().remove(mClickLocationOverlay);
		// mMapView.getOverlays().add(mClickLocationOverlay);
		MKPoiInfo info = new MKPoiInfo();
		info.pt = poi.geoPt;
		info.address = poi.strText;
		routeDrive(info, true);
		mMapView.refresh();
		Toast.makeText(LocationActivity.this, poi.strText, Toast.LENGTH_SHORT).show();
	}
}
 
开发者ID:haikuowuya,项目名称:like_googleplus_layout,代码行数:21,代码来源:LocationActivity.java

示例2: onMapPoiClick

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
@Override
public boolean onMapPoiClick(MapPoi mapPoi) {
    return false;
}
 
开发者ID:shenhuanet,项目名称:AndroidOpen,代码行数:5,代码来源:GeoCodeActivity.java

示例3: onMapPoiClick

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
@Override
public boolean onMapPoiClick(MapPoi poi) {
    return false;
}
 
开发者ID:shenhuanet,项目名称:AndroidOpen,代码行数:5,代码来源:RoutePlanDemo.java

示例4: showMapWithLocationClient

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
private void showMapWithLocationClient() {
	progressDialog = new ProgressDialog(this);
	progressDialog.setCanceledOnTouchOutside(false);
	progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
	progressDialog.setMessage("正在确定你的位置...");

	progressDialog.setOnCancelListener(new OnCancelListener() {

		public void onCancel(DialogInterface arg0) {
			if (progressDialog.isShowing()) {
				progressDialog.dismiss();
			}
			Log.d("map cancel retrieve location");
			finish();
		}
	});

	progressDialog.show();

	mLocClient = new LocationClient(this);
	mLocClient.registerLocationListener(myListener);

	LocationClientOption option = new LocationClientOption();
	option.setOpenGps(true);// 打开gps
	// option.setCoorType("bd09ll"); //设置坐标类型
	// Johnson change to use gcj02 coordination. chinese national standard
	// so need to conver to bd09 everytime when draw on baidu map
	option.setCoorType("gcj02");
	option.setScanSpan(30000);
	option.setAddrType("all");
	mLocClient.setLocOption(option);

	Drawable marker = this.getResources().getDrawable(R.drawable.icon_marka);
	// 为maker定义位置和边界
	marker.setBounds(0, 0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight());
	mAddrOverlay = new ItemizedOverlay<OverlayItem>(marker, mMapView);
	mMapView.getOverlays().add(mAddrOverlay);

	mMapListener = new MKMapViewListener() {

		@Override
		public void onMapMoveFinish() {
			// TODO Auto-generated method stub
		}

		@Override
		public void onClickMapPoi(MapPoi mapPoiInfo) {
			// TODO Auto-generated method stub
			String title = "";
			if (mapPoiInfo != null) {
				title = mapPoiInfo.strText;
				Toast.makeText(BaiduMapActivity.this, title, Toast.LENGTH_SHORT).show();
			}
		}

		@Override
		public void onGetCurrentMap(Bitmap b) {
			// TODO Auto-generated method stub

		}

		@Override
		public void onMapAnimationFinish() {
		}
	};
	mMapView.regMapViewListener(mBMapManager, mMapListener);

	if (lastLocation != null) {
		GeoPoint point1 = new GeoPoint((int) (lastLocation.getLatitude() * 1e6), (int) (lastLocation.getLongitude() * 1e6));
		point1 = CoordinateConvert.fromGcjToBaidu(point1);
		mMapController.setCenter(point1);
	}
	mMapView.refresh();
	mMapView.invalidate();
}
 
开发者ID:macyuan,项目名称:TAG,代码行数:76,代码来源:BaiduMapActivity.java

示例5: onMapPoiClick

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
@Override
public boolean onMapPoiClick(MapPoi arg0) {
	return false;
}
 
开发者ID:ContentCoderJian,项目名称:SmartTransXA,代码行数:5,代码来源:TransferOnlineActivity.java

示例6: onMapPoiClick

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
@Override
public boolean onMapPoiClick(MapPoi result) {
	return false;
}
 
开发者ID:ContentCoderJian,项目名称:SmartTransXA,代码行数:5,代码来源:BusLineOnlineActivity.java

示例7: onMapPoiClick

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
@Override
public boolean onMapPoiClick(MapPoi poi) {
	return false;
}
 
开发者ID:chenyufeng1991,项目名称:BaiduMap-TrafficAssistant,代码行数:5,代码来源:BusActivity.java

示例8: onMapPoiClick

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
@Override
public boolean onMapPoiClick(MapPoi arg0) {
	// TODO 自动生成的方法存根
	return false;
}
 
开发者ID:poomoo,项目名称:eDao,代码行数:6,代码来源:MapActivity.java

示例9: onClickMapPoi

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
@Override
public void onClickMapPoi(MapPoi mapPoiInfo) {
	// 点击到地图可点标注时会回调此接口
	
	String title = "";
	
	if(mapPoiInfo != null){
		
		title = mapPoiInfo.strText;
		
		ComFun.showToast(title);
		
		mMapController.animateTo(mapPoiInfo.geoPt);
		
	}
	
}
 
开发者ID:steven2947,项目名称:NeXT_pyp,代码行数:18,代码来源:BMapManagerActivity.java

示例10: onMapPoiClick

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
/**
 * 地图内 Poi 单击事件
 * @param mapPoi  点击的 poi 信息
 * @return
 */
@Override
public boolean onMapPoiClick(MapPoi mapPoi) {
    return false;
}
 
开发者ID:littleRich,项目名称:VirtualLocation,代码行数:10,代码来源:MapClickListener.java

示例11: onClickMapPoi

import com.baidu.mapapi.map.MapPoi; //导入依赖的package包/类
public void onClickMapPoi(MapPoi arg0) {
	// TODO Auto-generated method stub

}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:5,代码来源:PoiSelectActivity.java


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