示例#1
0
        private async void Map_PinDragEnd(object sender, PinDragEventArgs e)
        {
            if (e.Pin.Label == Constants.ORIGEN_LABEL)
            {
                Start  = new Geocode(e.Pin.Position.Latitude, e.Pin.Position.Longitude);
                Origin = await googleMapsApi.GetAddress(Start.StringLat(), Start.StringLng());

                SetOneDirection();
            }
            else
            {
                End         = new Geocode(e.Pin.Position.Latitude, e.Pin.Position.Longitude);
                Destination = await googleMapsApi.GetAddress(End.StringLat(), End.StringLng());
            }
            DrawRoute();
        }