public const int MAX_POLYGON_INDICES = 32; //TODO probably would be better in config file or some constants file /// <summary> /// Constructor for creating a polygon with specified geo points. /// </summary> /// <param name="points">Array of geo points fof which the polygon consists.</param> public Polygon(GeoPoint[] points) { if (points.Length > MAX_POLYGON_INDICES) { throw new ArgumentException("Too many geopoints for polygon"); } geoPoints_ = new RepeatedField <GeoPoint>(); GeoPoints.AddRange(points); }
/// <summary> /// Setter for setting geo points to a polygon. /// </summary> /// <param name="points">Array of geo points.</param> public void SetGeoPoints(GeoPoint[] points) { GeoPoints.Clear(); GeoPoints.AddRange(points); }