示例#1
0
        public void UserOffRoute(Location p0)
        {
            origin = Point.FromLngLat(lastLocation.Longitude, lastLocation.Latitude);
            GetRoute(origin, destination);
            Snackbar.Make(contentLayout, "User Off Route", Snackbar.LengthShort).Show();
            var marker = new MarkerOptions();

            marker.SetPosition(new LatLng(p0.Latitude, p0.Longitude));
            mapboxMap.AddMarker(marker);
        }
示例#2
0
        public bool OnMapClick(LatLng p0)
        {
            if (!running || mapboxMap == null || lastLocation == null)
            {
                return(false);
            }

            var marker = new MarkerOptions();

            marker.SetPosition(p0);
            mapboxMap.AddMarker(marker);
            mapboxMap.RemoveOnMapClickListener(this);

            destination = Point.FromLngLat(p0.Longitude, p0.Latitude);
            ResetLocationEngine(destination);

            tracking = false;
            return(false);
        }