Esempio n. 1
0
        private void PageMap_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
        {
            var flyout = (MenuFlyout)Flyout.GetAttachedFlyout(PageMap);

            ((MenuFlyoutItem)flyout.Items[1]).CommandParameter = args.Location;
            flyout.ShowAt(sender, args.Position);
        }
Esempio n. 2
0
 private void mcTweetMap_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
 {
     vibratePhone();
     addMapIcon(args.Location);
     reverseGeoCode(args.Location);
     gridBtnOptions.Visibility = Visibility.Visible;
     locationService.UpdateLocation(args.Location);
 }
        /// <summary>
        /// Handles the Right Click event of the MapControl to add a new location
        /// to the Locations list, using the position indicated by the gesture.
        /// </summary>
        private async void MyMap_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
        {
            var location = new LocationData {
                Position = args.Location.Position
            };

            // Resolve the address given the geocoordinates. In this case, because the
            // location is unambiguous, there is no need to pass in the current location.
            await LocationHelper.TryUpdateMissingLocationInfoAsync(location, null);

            EditNewLocation(location);
        }
Esempio n. 4
0
        private void MapMain_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
        {
            GeocodingLocation TapLocation = new GeocodingLocation(args.Location);

            MapPin newPin = new MapPin();

            newPin.DataContext = TapLocation;

            MapMain.Children.Add(newPin);
            MapControl.SetLocation(newPin, args.Location);
            MapControl.SetNormalizedAnchorPoint(newPin, new Point(0.5, 1));

            NavigationManager.Current.ShowLocation(TapLocation);
        }
Esempio n. 5
0
        private void MapMain_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
        {
            GeocodingLocation TapLocation = new GeocodingLocation(args.Location);

            MapPin newPin = new MapPin();
            newPin.DataContext = TapLocation;

            MapMain.Children.Add(newPin);
            MapControl.SetLocation(newPin, args.Location);
            MapControl.SetNormalizedAnchorPoint(newPin, new Point(0.5, 1));

            NavigationManager.Current.ShowLocation(TapLocation);
        }
 private void _mapControl_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
 {
     _mapContextMenu.ShowAt(sender, new Windows.Foundation.Point(args.Position.X, args.Position.Y));
 }
Esempio n. 7
0
 private void Map_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
 {
     RunMapRightTapped(Map, args.Location);
 }
Esempio n. 8
0
 private void DigiTransitMapControl_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
 {
     MapRightTapped?.Invoke(sender, args);
 }
 Point IMapRightTappedEventArgsResolver.Position(MapRightTappedEventArgs e) => e.Position;
 Geopoint IMapRightTappedEventArgsResolver.Location(MapRightTappedEventArgs e) => e.Location;
 /// <summary>
 /// Gets the physical position on the <see cref="MapControl"/> where it received user input.
 /// </summary>
 /// <param name="e">The requested <see cref="MapRightTappedEventArgs"/>.</param>
 /// <returns>
 /// The physical position on the <see cref="MapControl"/> where it received user input,
 /// in terms of X and Y coordinates.
 /// </returns>
 public static Point Position(this MapRightTappedEventArgs e) => Resolver.Position(e);
 /// <summary>
 /// Gets the geographic location that corresponds to where the <see cref="MapControl"/> received user input.
 /// </summary>
 /// <param name="e">The requested <see cref="MapRightTappedEventArgs"/>.</param>
 /// <returns>The geographic location that corresponds to where the <see cref="MapControl"/> received user input.</returns>
 public static Geopoint Location(this MapRightTappedEventArgs e) => Resolver.Location(e);