Example #1
0
        protected virtual void SendLocation(MvxGeoLocation location)
        {
            LastSeenLocation = location;
            var callback = _locationCallback;

            callback?.Invoke(location);
        }
 protected virtual void SendLocation(MvxGeoLocation location)
 {
     LastSeenLocation = location;
     var callback = _locationCallback;
     if (callback != null)
         callback(location);
 }
Example #3
0
        protected virtual void SendLocation(MvxGeoLocation location)
        {
            var callback = _locationCallback;

            if (callback != null)
            {
                callback(location);
            }
        }
 protected virtual void SendLocation(MvxGeoLocation location)
 {
     var callback = _locationCallback;
     callback?.Invoke(location);
 }
        private static MvxGeoLocation CreateLocation(Location androidLocation)
        {
            var position = new MvxGeoLocation {Timestamp = androidLocation.Time.FromMillisecondsUnixTimeToUtc()};
            var coords = position.Coordinates;

            if (androidLocation.HasAltitude)
                coords.Altitude = androidLocation.Altitude;

            if (androidLocation.HasBearing)
                coords.Heading = androidLocation.Bearing;

            coords.Latitude = androidLocation.Latitude;
            coords.Longitude = androidLocation.Longitude;
            if (androidLocation.HasSpeed)
                coords.Speed = androidLocation.Speed;
            if (androidLocation.HasAccuracy)
            {
                coords.Accuracy = androidLocation.Accuracy;
            }

            return position;
        }