找不到GoogleMap课程?

时间:2016-07-02 04:16:02

标签: android google-maps

这是我的代码,为什么GoogleMap类不从库中导入?

import android.app.Activity;
import android.os.Bundle;
public class FirstMap extends Activity {

    private GoogleMap map;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_firstmap);

        map = ((SupportMapFragment)getFragmentManager().findFragmentById(R.id.map)).getMap();
        map.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
    }
}

0 个答案:

没有答案