示例#1
0
            public override IJavaObject AddBindingMapOverlay(IBindingMapOverlay overlay)
            {
                CircleOptions circleOptions = null;

                if (overlay is ExampleBindingOverlay mOverlay)
                {
                    circleOptions = new CircleOptions()
                                    .InvokeCenter(mOverlay.Location.ToLatLng())
                                    .InvokeRadius(mOverlay.Radius)
                                    .InvokeStrokeWidth(0)
                                    .Clickable(true);

                    switch (mOverlay.Id)
                    {
                    case 1:
                        circleOptions.InvokeFillColor(Context.GetColor(Android.Resource.Color.HoloBlueLight));
                        break;

                    case 2:
                        circleOptions.InvokeFillColor(Context.GetColor(Android.Resource.Color.HoloRedLight));
                        break;

                    case 3:
                        circleOptions.InvokeFillColor(Context.GetColor(Android.Resource.Color.HoloGreenLight));
                        break;

                    case 4:
                        circleOptions.InvokeFillColor(Context.GetColor(Android.Resource.Color.HoloOrangeLight));
                        break;

                    case 5:
                        circleOptions.InvokeFillColor(Context.GetColor(Android.Resource.Color.HoloPurple));
                        break;
                    }
                }

                return(circleOptions);
            }
示例#2
0
 public virtual IBindingMKMapOverlay GetViewForBindingOverlay(MKMapView mapView, IBindingMapOverlay bindingMapOverlay) => null;
示例#3
0
 public abstract IJavaObject AddBindingMapOverlay(IBindingMapOverlay overlay);
示例#4
0
 public override IBindingMKMapOverlay GetViewForBindingOverlay(MKMapView mapView, IBindingMapOverlay bindingMapOverlay)
 {
     if (bindingMapOverlay is ExampleBindingOverlay eOverlay)
     {
         var result = BindingMKCircle.Circle(eOverlay.Location.ToCLLocationCoordinate2D(), eOverlay.Radius);
         result.Renderer = new MKCircleRenderer(result)
         {
             StrokeColor = UIColor.Blue,
             LineWidth   = 1f,
             FillColor   = UIColor.Gray
         };
         return(result);
     }
     return(base.GetViewForBindingOverlay(mapView, bindingMapOverlay));
 }
示例#5
0
 public override IJavaObject AddBindingMapOverlay(IBindingMapOverlay overlay)
 {
     return(null);
 }
示例#6
0
 public IJavaObject AddBindingMapOverlay(GoogleMap googleMap, IBindingMapOverlay overlay)
 {
     return(null);
 }