Exemplo n.º 1
0
        public void OnGetPoiResult(PoiResult result)
        {
            if (result == null
                    || result.Error == SearchResult.ERRORNO.ResultNotFound)
            {
                return;
            }
            if (result.Error == SearchResult.ERRORNO.NoError)
            {
                mBaiduMap.Clear();
                PoiOverlay overlay = new MyPoiOverlay(this, mBaiduMap);
                mBaiduMap.SetOnMarkerClickListener(overlay);
                overlay.SetData(result);
                overlay.AddToMap();
                overlay.ZoomToSpan();
                return;
            }
            if (result.Error == SearchResult.ERRORNO.AmbiguousKeyword)
            {

                // ������ؼ����ڱ���û���ҵ����������������ҵ�ʱ�����ذ����ùؼ�����Ϣ�ij����б�
                string strInfo = "��";
                foreach (CityInfo cityInfo in result.SuggestCityList)
                {
                    strInfo += cityInfo.City;
                    strInfo += ",";
                }
                strInfo += "�ҵ����";
                Toast.MakeText(this, strInfo, ToastLength.Long)
                        .Show();
            }
        }
Exemplo n.º 2
0
 public void OnGetPoiResult(PoiResult result)
 {
     if (result == null || result.Error != SearchResult.ERRORNO.NoError)
     {
         Toast.MakeText(this, "��Ǹ��δ�ҵ����",
                 ToastLength.Long).Show();
         return;
     }
     mBaiduMap.Clear();
     PoiShareOverlay poiOverlay = new PoiShareOverlay(this, mBaiduMap);
     mBaiduMap.SetOnMarkerClickListener(poiOverlay);
     poiOverlay.SetData(result);
     poiOverlay.AddToMap();
     poiOverlay.ZoomToSpan();
 }
Exemplo n.º 3
0
 public void OnGetPoiResult(PoiResult result)
 {
     if (result == null || result.Error != SearchResult.ERRORNO.NoError)
     {
         Toast.MakeText(this, "��Ǹ��δ�ҵ����",
                 ToastLength.Long).Show();
         return;
     }
     // ��������poi���ҵ�����Ϊ������·��poi
     busLineIDList.Clear();
     foreach (PoiInfo poi in result.AllPoi)
     {
         if (poi.Type == PoiInfo.POITYPE.BusLine
                 || poi.Type == PoiInfo.POITYPE.SubwayLine)
         {
             busLineIDList.Add(poi.Uid);
         }
     }
     SearchNextBusline(null);
     route = null;
 }