Search in sources :

Example 1 with MapView

use of com.amap.api.maps2d.MapView in project summer-android by cn-cerc.

the class ClockInActivity method changeToAmapView.

private void changeToAmapView(Bundle savedInstanceState) {
    if (myLaLn == null) {
        mAmapView = new MapView(this, new AMapOptions().camera(new CameraPosition(new LatLng(114.025, 22.540412), 16, 0, 0)));
    } else {
        mAmapView = new MapView(this, new AMapOptions().camera(new CameraPosition(new LatLng(myLaLn.latitude, myLaLn.longitude), 16, 0, 0)));
    }
    mAmapView.onCreate(savedInstanceState);
    mAmapView.onResume();
    mContainerLayout.addView(mAmapView);
    if (aMap == null) {
        aMap = mAmapView.getMap();
        setUpMap();
        setupLocationStyle();
    }
}
Also used : CameraPosition(com.amap.api.maps2d.model.CameraPosition) MapView(com.amap.api.maps2d.MapView) AMapOptions(com.amap.api.maps2d.AMapOptions) LatLng(com.amap.api.maps2d.model.LatLng)

Aggregations

AMapOptions (com.amap.api.maps2d.AMapOptions)1 MapView (com.amap.api.maps2d.MapView)1 CameraPosition (com.amap.api.maps2d.model.CameraPosition)1 LatLng (com.amap.api.maps2d.model.LatLng)1