Example #1
0
        /// <summary>
        /// Allows you to set the center of a Map control using a Windows.Devices.Geolocation.Geocoordinate
        /// </summary>
        /// <param name="map">the Map control instance</param>
        /// <param name="coord">The Geocoordinate object to use to set the center of the map</param>
        public static void SetCenter(this Microsoft.Phone.Maps.Controls.Map map, Windows.Devices.Geolocation.Geocoordinate coord)
        {
            System.Device.Location.GeoCoordinate centre = new System.Device.Location.GeoCoordinate()
            {
                Latitude  = coord.Latitude,
                Longitude = coord.Longitude,
            };

            map.Center = centre;
        }
 internal static Geocoordinate ToLocalGeocoordinate(this Windows.Devices.Geolocation.Geocoordinate coordinate)
 {
     return(coordinate == null
                ? null
                : new Geocoordinate
     {
         Accuracy = coordinate.Accuracy,
         Altitude =
             coordinate.Point == null ? 0 : coordinate.Point.Position.Altitude,
         Heading = coordinate.Heading ?? 0,
         Latitude =
             coordinate.Point == null ? 0 : coordinate.Point.Position.Latitude,
         Longitude =
             coordinate.Point == null ? 0 : coordinate.Point.Position.Longitude,
         Speed = coordinate.Speed ?? 0,
         Timestamp = coordinate.Timestamp
     });
 }
Example #3
0
 private Geocoordinate(Windows.Devices.Geolocation.Geocoordinate coordinate)
 {
     _coordinate = coordinate;
 }
Example #4
0
        /*internal Geocoordinate(DateTimeOffset timestamp, global::System.Device.Location.GeoCoordinate coordinate)
         * {
         *  Timestamp = timestamp;
         *  _coordinate = coordinate;
         * }*/

        private Geocoordinate(global::System.Device.Location.GeoCoordinate coordinate)
        {
            _coordinate = coordinate;
        }
Example #5
0
 private Geocoordinate(Windows.Devices.Geolocation.Geocoordinate coordinate)
 {
     _coordinate = coordinate;
 }