Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Xamarin.Forms.Maps Pin Click Event To Launch iOS Map.app

$
0
0

Hello, so, I was wondering if you have access to a Pin such as the code below, can you then create an event receiver to launch the Map App programatically and send the location of the pin so that the Map App on the device can give you directions? Thanks

        var map = new Map (
            MapSpan.FromCenterAndRadius (
                new Position(39.124164, -76.823165),Distance.FromMiles(0.3))){
            IsShowingUser = true,
        };

        var pin = new Pin {
            Type = PinType.Place,
            Position = new Position (39.124164, -76.823165),
            Label = "JailBreak Laurel Brewery",
            Address = "9445 Washington Blvd N, STE F, Laurel, MD 20723"
        };
        map.Pins.Add (pin);

        pin.Clicked += (sender, e) => {
            //DisplayAlert("Go to JB Laurel", "JB Pin Clicked", "Ok");
            //I want to call the iOS Map App sending the location/position

        };

Thanks in advance
Fabian Williams @FabianWilliams


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>