您的位置:首页 > 其它

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

2017-01-08 17:24 447 查看
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;这里。

请大神们帮我看看,小白在此多谢啦!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: