Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 /// <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);
 }