Exemplo n.º 1
0
 public void OnGetSearchResult(CloudSearchResult result, int error)
 {
     if (result != null && result.PoiList != null
             && result.PoiList.Count > 0)
     {
         Log.Debug(LTAG, "onGetSearchResult, result length: " + result.PoiList.Count);
         mBaiduMap.Clear();
         BitmapDescriptor bd = BitmapDescriptorFactory.FromResource(Resource.Drawable.icon_gcoding);
         LatLng ll;
         LatLngBounds.Builder builder = new LatLngBounds.Builder();
         foreach (CloudPoiInfo info in result.PoiList)
         {
             ll = new LatLng(info.Latitude, info.Longitude);
             OverlayOptions oo = new MarkerOptions().InvokeIcon(bd).InvokePosition(ll);
             mBaiduMap.AddOverlay(oo);
             builder.Include(ll);
         }
         LatLngBounds bounds = builder.Build();
         MapStatusUpdate u = MapStatusUpdateFactory.NewLatLngBounds(bounds);
         mBaiduMap.AnimateMapStatus(u);
     }
 }