Exemple #1
0
        private void InitializeLocationEngine()
        {
            locationEngine = LocationEngineProvider.GetBestLocationEngine(ApplicationContext);
            LocationEngineRequest request = BuildEngineRequest();

            locationEngine.RequestLocationUpdates(request, callback, null);
            ShowSnackbar(SEARCHING_FOR_GPS_MESSAGE, BaseTransientBottomBar.LengthShort);
        }
Exemple #2
0
        //private void ShowSettings()
        //{
        //    StartActivityForResult(new Intent(this, typeof(NavigationSettingsActivity)), CHANGE_SETTING_REQUEST_CODE);
        //}

        private void InitializeLocationEngine()
        {
            locationEngine = LocationEngineProvider.GetBestLocationEngine(ApplicationContext);
            LocationEngineRequest request = BuildEngineRequest();

            locationEngine.RequestLocationUpdates(request, callback, null);
            locationEngine.GetLastLocation(callback);
        }
        public void OnMapReady(MapboxMap p0)
        {
            this.mapboxMap = p0;
            this.mapboxMap.AddOnMapClickListener(this);

            mapboxMap.SetStyle(Style.MapboxStreets, new MapboxMapSetStyleListener((style) =>
            {
                LocationComponent locationComponent = mapboxMap.LocationComponent;
                locationComponent.ActivateLocationComponent(this, style);
                locationComponent.RenderMode = RenderMode.Gps;
                locationComponent.LocationComponentEnabled = false;
                navigationMapRoute = new NavigationMapRoute(navigation, mapView, mapboxMap);
                Snackbar.Make(FindViewById <ConstraintLayout>(Resource.Id.container), "Tap map to place waypoint",
                              BaseTransientBottomBar.LengthLong).Show();
                locationEngine = new ReplayRouteLocationEngine();
                NewOrigin();
            }));
        }
 private void InitializeLocationEngine()
 {
     locationEngine = LocationEngineProvider.GetBestLocationEngine(ApplicationContext);
     locationEngine.GetLastLocation(callback);
 }