//package com.jqyd.newprocess;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import android.app.Activity;
//import android.app.AlertDialog;
//import android.app.ProgressDialog;
//import android.content.Context;
//import android.content.Intent;
//import android.graphics.Canvas;
//import android.graphics.drawable.Drawable;
//import android.os.Bundle;
//import android.os.Handler;
//import android.os.Message;
//import android.text.Spanned;
//import android.util.Log;
//import android.view.KeyEvent;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.Window;
//import android.view.View.OnClickListener;
//import android.widget.AutoCompleteTextView;
//import android.widget.Button;
//import android.widget.ImageButton;
//import android.widget.LinearLayout;
//import android.widget.RelativeLayout;
//import android.widget.TextView;
//import android.widget.Toast;
//
//
//import com.amap.mapapi.core.GeoPoint;
//import com.amap.mapapi.core.OverlayItem;
//import com.amap.mapapi.map.MapActivity;
//import com.amap.mapapi.map.MapController;
//import com.amap.mapapi.map.MapView;
//import com.amap.mapapi.map.MyLocationOverlay;
//import com.amap.mapapi.map.Overlay;
//import com.amap.mapapi.map.RouteOverlay;
//import com.jqyd.app.MyApp;
//import com.jqyd.manager.R;
//import com.jqyd.model.PositionInfo;
//
//
//public class Wzcx extends MapActivity{
// MapView mapView = null;
// MapController mapController = null;
// String content = "";
// private static final String TAG = "wzcx";
// Spanned spContent = null;
//
// private GeoPoint point;
// private MyLocationOverlay mLocationOverlay;
// //新增
// View popView;
// GeoPoint gp;
// int i;
//
// private AutoCompleteTextView startTextView;
// private AutoCompleteTextView endTextView;
//
// private String poiType;
// private RouteOverlay ol;
// private GeoPoint startPoint = null;
// private GeoPoint endPoint = null;
// private MapPointOverlay overlay;
//
// @SuppressWarnings("unchecked")
// @Override
// public void onCreate(Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
// requestWindowFeature(Window.FEATURE_NO_TITLE);//隐藏标题栏
// setContentView(R.layout.wzcx);
// Log.e("Wzcx", "Wzcx--------");
// mapView = (MapView) findViewById(R.id.mylocationview);
// mapView.setBuiltInZoomControls(true);
// mapController = mapView.getController();
// point = new GeoPoint((int) (39.90923 * 1E6),
// (int) (116.397428 * 1E6)); //用给定的经纬度构造一个GeoPoint,单位是微度 (度 * 1E6)
// mapController.setCenter(point); //设置地图中心点
// mapController.setZoom(14);
// /**
// * 显示被定为人的位置信息
// */
// Intent intent = getIntent();
// ArrayList<PositionInfo> locations = null;
// locations = (ArrayList<PositionInfo>)intent.getSerializableExtra("locList");
// for(PositionInfo position : locations){
// Double lon = position.getLon();
// Double lat = position.getLat();
// String addtime = position.getAddTime().split("-")[1]+"/"+position.getAddTime().split("-")[2];
// content = position.getZdmc()+"#"
// +"手机号码:"+position.getSjhm()
// +"<br>时间:"+addtime+"</br>"
// +"<br>经度:"+position.getLon()+"</br>"
// +"<br>纬度:"+position.getLat()+"</br>"
// +"<br>详情:"+position.getContent()+"</br>";
// gp = new GeoPoint((int) (lat * 1E6), (int) (lon * 1E6));
// setMapView();
// }
// }
//
// @Override
// protected boolean isRouteDisplayed() {
// return false;
// }
//
//
//
// /**
// * 设置地图显示
// */
// private void setMapView(){
// mapView.setStreetView(true);
// Drawable drawable = this.getResources().getDrawable(R.drawable.poi_1);
// //设置图片的绘制区域大小
// drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
// this.mapController.animateTo(gp);//通过动画方式移动到指定坐标
// setView();//设置弹出框
// OverLay myOverlay = new OverLay(drawable,this,0);
// myOverlay.addOverlay(new OverlayItem(gp, "", content));
// mapView.getOverlays().add(myOverlay);
// mapView.invalidate();
// }
//
// /**
// * 设置地图标记弹出框样式
// */
// private void setView(){
// if(popView==null){
// popView = super.getLayoutInflater().inflate(R.layout.pop, null);
// mapView.addView(popView,
// new MapView.LayoutParams(MapView.LayoutParams.WRAP_CONTENT,
// MapView.LayoutParams.WRAP_CONTENT,
// null, MapView.LayoutParams.BOTTOM_CENTER));
//
// popView.setVisibility(View.GONE);
// }
// }
//
// @Override
// protected void onPause() {
// try {
// this.mLocationOverlay.disableMyLocation();
// } catch (Exception e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// super.onPause();
// }
//
// @Override
// protected void onResume() {
// try {
// this.mLocationOverlay.enableMyLocation();
// } catch (Exception e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// super.onResume();
// }
//
// public void showToast(String showString) {
// Toast.makeText(getApplicationContext(), showString, Toast.LENGTH_SHORT)
// .show();
// }
//
// public class MapPointOverlay extends Overlay {
// private Context context;
// private LayoutInflater inflater;
// private View popUpView;
//
// public MapPointOverlay(Context context) {
// this.context = context;
// inflater = (LayoutInflater) context
// .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
// }
//
// @Override
// public void draw(Canvas canvas, MapView mapView, boolean shadow) {
// // TODO Auto-generated method stub
// super.draw(canvas, mapView, shadow);
// }
//
// @Override
// public boolean onTap(final GeoPoint point, final MapView view) {
// if (popUpView != null) {
// view.removeView(popUpView);
// }
// // Projection接口用于屏幕像素点坐标系统和地球表面经纬度点坐标系统之间的变换
// popUpView = inflater.inflate(R.layout.popup, null);
// TextView textView = (TextView) popUpView.findViewById(R.id.PoiName);
// textView.setText("点击即可选择此点");
// MapView.LayoutParams lp;
// lp = new MapView.LayoutParams(MapView.LayoutParams.WRAP_CONTENT,
// MapView.LayoutParams.WRAP_CONTENT, point, 0, 0,
// MapView.LayoutParams.BOTTOM_CENTER);
// view.addView(popUpView, lp);
// popUpView.setOnClickListener(new OnClickListener() {
// @Override
// public void onClick(View v) {
// if (poiType.equals("startPoint")) {
// startTextView.setText("地图上的点");
// startTextView.selectAll();
// startPoint = point;
// }
//
// if (poiType.equals("endPoint")) {
// endTextView.setText("地图上的点");
// endTextView.selectAll();
// endPoint = point;
// }
//
// view.removeView(popUpView);
// view.getOverlays().remove(overlay);
// }
// });
// return super.onTap(point, view);
// }
// }
//}
//