Пример #1
0
        private void AddTappedLocationAndRaise(Position position)
        {
            if (!_allowedToAddPoint)
            {
                return;
            }

            Pins.Add(new TKCustomMapPin {
                Position = position, DefaultPinColor = Color.Teal
            });
            if (Pins.Count <= 1)
            {
                return;                  // can't make a line with 1 pin
            }
            var previous = Pins.Reverse().Skip(1).First();

            Polylines.Add(new TKPolyline {
                LineCoordinates = new List <Position> {
                    previous.Position, position
                }, Color = Color.Teal, LineWidth = 2
            });
        }