public void setCoordinate_Selector() { MKPolygon pg = MKPolygon.FromPoints(new MKMapPoint [] { }); try { pg.Coordinate = new CLLocationCoordinate2D(10, 20); } catch (MonoTouchException mte) { Assert.True(mte.Message.Contains("unrecognized selector sent to instance")); } catch { Assert.Fail("API could be working/implemented"); } }
private void updateMapFromDictionary(int index) { if (mapView.Overlays != null) { mapView.RemoveOverlays(mapView.Overlays); } if (mapView.Annotations != null) { mapView.RemoveAnnotations(mapView.Annotations); } From fromPlace = fromNameDictionary [index]; mapView.AddAnnotation(new MKStartPointAnnotation() { Title = fromPlace.name, Coordinate = new CLLocationCoordinate2D(fromPlace.lat, fromPlace.lon), Mode = modeDictionary[index] }); To toPlace = toNameDictionary [index]; mapView.AddAnnotation(new MKEndPointAnnotation() { Title = toPlace.name, Coordinate = new CLLocationCoordinate2D(toPlace.lat, toPlace.lon) }); MKPolyline polyline = polylineDictionary [index]; mapView.AddOverlay(polyline); MKPolygon polygon = MKPolygon.FromPoints(polyline.Points); mapView.SetVisibleMapRect(polygon.BoundingMapRect, new UIEdgeInsets(20, 10, 10, 10), true); }
public void FromPoints_Interior_Empty() { MKPolygon pg = MKPolygon.FromPoints(new MKMapPoint [] { }, new MKPolygon [] { }); CheckEmpty(pg); }
public void FromPoints_Null() { MKPolygon.FromPoints(null); }
public void FromPoints_Null() { Assert.Throws <ArgumentNullException> (() => MKPolygon.FromPoints(null)); }
public static BindingMKPolygon FromPoints(MKMapPoint[] points, MKPolygon[] interiorPolygons) => new BindingMKPolygon(MKPolygon.FromPoints(points, interiorPolygons));
public static BindingMKPolygon FromPoints(MKMapPoint[] points) => new BindingMKPolygon(MKPolygon.FromPoints(points));