예제 #1
0
        /// <summary>
        /// Positions current location indicator on map
        /// </summary>
        /// <param name="pin">Current location pin object</param>
        /// <param name="position">Latitude/longitude at which to place pin</param>
        public static void SetCurrentLocationPin(this Map m, CurrentLocationPin pin, LatLong position)
        {
            MapLayer.SetPositionAnchor(pin, pin.AnchorPoint);
            MapLayer.SetPosition(pin, new Location(position.Latitude, position.Longitude));

            if (!m.Children.Contains(pin))
            {
                m.Children.Add(pin);
            }

            pin.Visibility = Visibility.Visible;
        }
예제 #2
0
        /// <summary>
        /// Positions current location indicator on map
        /// </summary>
        /// <param name="pin">Current location pin object</param>
        /// <param name="position">Latitude/longitude at which to place pin</param>
        public static void SetCurrentLocationPin(this Map m, CurrentLocationPin pin, LatLong position)
        {
            MapLayer.SetPositionAnchor(pin, pin.AnchorPoint);
            MapLayer.SetPosition(pin, new Location(position.Latitude, position.Longitude));

            if (!m.Children.Contains(pin))
                m.Children.Add(pin);

            pin.Visibility = Visibility.Visible;
        }