package com.example.location;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.RelativeLayout;
import android.widget.Toast;
import com.baidu.mapapi.BMapManager;
import com.baidu.mapapi.MKGeneralListener;
import com.baidu.mapapi.map.MapController;
import com.baidu.mapapi.map.MapView;
import com.baidu.platform.comapi.basestruct.GeoPoint;
public class MainActivity extends Activity {
MapView mapview =null;
MapController mapcontroller=null;
BMapManager BmapManager=null;
String Key="自己申请的key值";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
BmapManager=new BMapManager(getApplication());
BmapManager.init(Key, new mkGeneralListener());
RelativeLayout map=(RelativeLayout)findViewById(R.id.MapView);
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载