package com.huwei.chbiao;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.baidu.mapapi.BMapManager;
import com.baidu.mapapi.MKGeneralListener;
import com.baidu.mapapi.map.ItemizedOverlay;
import com.baidu.mapapi.map.LocationData;
import com.baidu.mapapi.map.MapController;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.MyLocationOverlay;
import com.baidu.mapapi.map.OverlayItem;
import com.baidu.platform.comapi.basestruct.GeoPoint;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
public class BuJiu extends Activity{
BMapManager mBMapMan = null;
MapView mMapView = null; //定义地图控件
private String keystring="EjWwq91tssBWsOpiDXLEv1Al";
//定位到当前位置
private LocationClient mLocationClient;
private MyBDLocationListener mBDLocationListener;
private MyLocationOverlay myLocationOverlay = null;
private LocationData locationData = null;
BMapManager mMapManager;
TextView tv1;
Button bt1;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
mBMapMan=new BMapManager(getApplication());
//KEY验证
mBMapMan.init(keystring, new MKGeneralListener() {
public void onGetPermissionState(int arg0) {
if(arg0==300){Toast.makeText(BuJiu.this, "验证码错误!", 1).show();}
从Excel中读取已知坐标 添加到百度地图上
最新推荐文章于 2024-02-28 15:54:28 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)