Beispiel #1
0
        public Position(Position position)
        {
            if (position == null)
                throw new ArgumentNullException("position");

            Timestamp = position.Timestamp;
            Latitude = position.Latitude;
            Longitude = position.Longitude;
            Altitude = position.Altitude;
            AltitudeAccuracy = position.AltitudeAccuracy;
            Accuracy = position.Accuracy;
            Heading = position.Heading;
            Speed = position.Speed;
        }
        private void _sendUpdate(Position location)
        {
            if (location == null)
                CurrentLocation.IsResolved = false;
            else
            {
                CurrentLocation.Accuracy = location.Accuracy;
                CurrentLocation.Latitude = location.Latitude;
                CurrentLocation.Longitude = location.Longitude;
                CurrentLocation.Heading = location.Heading;
                CurrentLocation.HeadingAvailable = _geolocator.SupportsHeading;
                CurrentLocation.Speed = location.Speed;
                CurrentLocation.Altitude = location.Altitude;
                CurrentLocation.AltitudeAccuracy = location.AltitudeAccuracy;
                // assume that any location event that came through is valid
                // and also assume this property means sorrthe location is legit
                CurrentLocation.IsResolved = true;
                CurrentLocation.Status = XPositionStatus.Ready;
            }

            _fire();
        }
Beispiel #3
0
        public PositionEventArgs(Position position)
        {
            if (position == null)
                throw new ArgumentNullException("position");

            Position = position;
        }