use of com.amap.api.maps2d.model.LatLng 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();
}
}
use of com.amap.api.maps2d.model.LatLng in project KL2 by jweihao.
the class GaoDeActivity method refleshSelectByListMark.
/**
* 刷新地图标志物选中列表的位置
*
* @param latitude
* @param longitude
*/
private void refleshSelectByListMark(double latitude, double longitude) {
if (mSelectByListMarker == null) {
mSelectByListMarker = mAMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).icon(BitmapDescriptorFactory.fromBitmap(BitmapFactory.decodeResource(getResources(), R.mipmap.location_red))).draggable(true));
}
mSelectByListMarker.setPosition(new LatLng(latitude, longitude));
if (!mSelectByListMarker.isVisible()) {
mSelectByListMarker.setVisible(true);
}
mAMap.invalidate();
}
use of com.amap.api.maps2d.model.LatLng in project KL2 by jweihao.
the class GaoDeActivity method refleshMark.
/**
* 刷新地图标志物位置
*
* @param latitude
* @param longitude
*/
private void refleshMark(double latitude, double longitude) {
if (mMarker == null) {
mMarker = mAMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).icon(BitmapDescriptorFactory.fromBitmap(BitmapFactory.decodeResource(getResources(), android.R.color.transparent))).draggable(true));
}
mMarker.setPosition(new LatLng(latitude, longitude));
mAMap.invalidate();
}
Aggregations