如何让百度地图显示出来?(问题出现位置已用!!!表示)

来源:互联网 发布:淘宝店铺风格怎么设置 编辑:程序博客网 时间:2024/05/18 02:39
package com.baidumaptest;

import android.app.Activity;
import android.os.Bundle;

import com.baidu.lbsapi.BMapManager;
import com.baidu.mapapi.map.MapView;



public class ABMMainActivity extends Activity {
private BMapManager manager;
private MapView mapView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
manager = new BMapManager(this);
manager.init("SHVPoTtIpzfonPD3HCkc5sIt", null);!!!
setContentView(R.layout.abmmain);
mapView = (MapView) findViewById(R.id.map_view);
mapView.setBuiltInZoomControls(true);!!!
}

@Override
protected void onResume() {
mapView.onResume();
if (manager != null) {
manager.start();!!!
}
super.onResume();
}
@Override
protected void onPause() {
mapView.onPause();
if (manager != null) {
manager.stop();!!!
}
super.onPause();
}
@Override
protected void onDestroy() {!!!
mapView.destroy();!!!
if (manager != null) {
manager.destroy();
manager = null;
}
super.onDestroy();
}
}
出现以下几个问题:
1、The method init(MKGeneralListener) in the type BMapManager is not applicable for the arguments (String, null)
2、The method setBuiltInZoomControls(boolean) is undefined for the type MapView
3、The method start() is undefined for the type BMapManager
4、The method stop() is undefined for the type BMapManager
5、The method destroy() is undefined for the type MapView
是引用包问题还是什么,个人觉得问题也许处在private BMapManager manager;这里。
请大神们帮我看看,小白在此多谢啦!
0 0
原创粉丝点击