// Path: src/com/ly/hi/im/view/HeaderLayout.java
// public interface onRightImageButtonClickListener {
// 	void onClick();
// }


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import cn.bmob.im.util.BmobLog;
import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.baidu.mapapi.SDKInitializer;
import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.BitmapDescriptor;
import com.baidu.mapapi.map.BitmapDescriptorFactory;
import com.baidu.mapapi.map.MapStatusUpdate;
import com.baidu.mapapi.map.MapStatusUpdateFactory;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.MarkerOptions;
import com.baidu.mapapi.map.MyLocationConfiguration;
import com.baidu.mapapi.map.MyLocationData;
import com.baidu.mapapi.map.OverlayOptions;
import com.baidu.mapapi.model.LatLng;
import com.baidu.mapapi.search.core.SearchResult;
import com.baidu.mapapi.search.geocode.GeoCodeResult;
import com.baidu.mapapi.search.geocode.GeoCoder;
import com.baidu.mapapi.search.geocode.OnGetGeoCoderResultListener;
import com.baidu.mapapi.search.geocode.ReverseGeoCodeOption;
import com.baidu.mapapi.search.geocode.ReverseGeoCodeResult;
import com.ly.hi.R;
import com.ly.hi.im.view.HeaderLayout.onRightImageButtonClickListener;
	GeoCoder mSearch = null; // ËÑË÷Ä£¿é£¬ÒòÎª°Ù¶È¶¨Î»sdkÄÜ¹»µÃµ½¾­Î³¶È£¬µ«ÊÇÈ´ÎÞ·¨µÃµ½¾ßÌåµÄÏêÏ¸µØÖ·£¬Òò´ËÐèÒª²ÉÈ¡·´±àÂë·½Ê½È¥ËÑË÷´Ë¾­Î³¶È´ú±íµÄµØÖ·

	static BDLocation lastLocation = null;

	BitmapDescriptor bdgeo = BitmapDescriptorFactory.fromResource(R.drawable.icon_geo); 
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_location);
		initBaiduMap();
	}

	private void initBaiduMap() {
		// µØÍ¼³õÊ¼»¯
		mMapView = (MapView) findViewById(R.id.bmapView);
		mBaiduMap = mMapView.getMap();
		//ÉèÖÃËõ·Å¼¶±ð
		mBaiduMap.setMaxAndMinZoomLevel(18, 13);
		// ×¢²á SDK ¹ã²¥¼àÌýÕß
		IntentFilter iFilter = new IntentFilter();
		iFilter.addAction(SDKInitializer.SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR);
		iFilter.addAction(SDKInitializer.SDK_BROADCAST_ACTION_STRING_NETWORK_ERROR);
		mReceiver = new BaiduReceiver();
		registerReceiver(mReceiver, iFilter);

		Intent intent = getIntent();
		String type = intent.getStringExtra("type");
		if (type.equals("select")) {// Ñ¡Ôñ·¢ËÍÎ»ÖÃ
			initTopBarForBoth("Î»ÖÃ", R.drawable.btn_login_selector, "·¢ËÍ",
// Path: src/com/ly/hi/im/view/HeaderLayout.java
// public interface onRightImageButtonClickListener {
// 	void onClick();
// }


// Path: src/com/ly/hi/im/ui/LocationActivity.java
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import cn.bmob.im.util.BmobLog;
import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.baidu.mapapi.SDKInitializer;
import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.BitmapDescriptor;
import com.baidu.mapapi.map.BitmapDescriptorFactory;
import com.baidu.mapapi.map.MapStatusUpdate;
import com.baidu.mapapi.map.MapStatusUpdateFactory;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.MarkerOptions;
import com.baidu.mapapi.map.MyLocationConfiguration;
import com.baidu.mapapi.map.MyLocationData;
import com.baidu.mapapi.map.OverlayOptions;
import com.baidu.mapapi.model.LatLng;
import com.baidu.mapapi.search.core.SearchResult;
import com.baidu.mapapi.search.geocode.GeoCodeResult;
import com.baidu.mapapi.search.geocode.GeoCoder;
import com.baidu.mapapi.search.geocode.OnGetGeoCoderResultListener;
import com.baidu.mapapi.search.geocode.ReverseGeoCodeOption;
import com.baidu.mapapi.search.geocode.ReverseGeoCodeResult;
import com.ly.hi.R;
import com.ly.hi.im.view.HeaderLayout.onRightImageButtonClickListener;

	GeoCoder mSearch = null; // ËÑË÷Ä£¿é£¬ÒòÎª°Ù¶È¶¨Î»sdkÄÜ¹»µÃµ½¾­Î³¶È£¬µ«ÊÇÈ´ÎÞ·¨µÃµ½¾ßÌåµÄÏêÏ¸µØÖ·£¬Òò´ËÐèÒª²ÉÈ¡·´±àÂë·½Ê½È¥ËÑË÷´Ë¾­Î³¶È´ú±íµÄµØÖ·

	static BDLocation lastLocation = null;

	BitmapDescriptor bdgeo = BitmapDescriptorFactory.fromResource(R.drawable.icon_geo); 
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_location);
		initBaiduMap();
	}

	private void initBaiduMap() {
		// µØÍ¼³õÊ¼»¯
		mMapView = (MapView) findViewById(R.id.bmapView);
		mBaiduMap = mMapView.getMap();
		//ÉèÖÃËõ·Å¼¶±ð
		mBaiduMap.setMaxAndMinZoomLevel(18, 13);
		// ×¢²á SDK ¹ã²¥¼àÌýÕß
		IntentFilter iFilter = new IntentFilter();
		iFilter.addAction(SDKInitializer.SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR);
		iFilter.addAction(SDKInitializer.SDK_BROADCAST_ACTION_STRING_NETWORK_ERROR);
		mReceiver = new BaiduReceiver();
		registerReceiver(mReceiver, iFilter);

		Intent intent = getIntent();
		String type = intent.getStringExtra("type");
		if (type.equals("select")) {// Ñ¡Ôñ·¢ËÍÎ»ÖÃ
			initTopBarForBoth("Î»ÖÃ", R.drawable.btn_login_selector, "·¢ËÍ",
					new onRightImageButtonClickListener() {