private void InitializeLocationComponent(Style style)
        {
            LocationComponent locationComponent = mapboxMap.LocationComponent;

            locationComponent.ActivateLocationComponent(this, style, locationEngine);
            locationComponent.LocationComponentEnabled = true;
            locationComponent.RenderMode = RenderMode.Compass;
        }
예제 #2
0
        private void InitializeLocationComponent(MapboxMap mapboxMap)
        {
            LocationComponent locationComponent = mapboxMap.LocationComponent;

            locationComponent.ActivateLocationComponent(this, mapboxMap.Style);
            locationComponent.LocationComponentEnabled = true;
            locationComponent.RenderMode = RenderMode.Compass;
            locationComponent.CameraMode = CameraMode.Tracking;
            locationComponent.ZoomWhileTracking(10d);
        }
 private void MostrarUbicacionTiempoReal()
 {
     if (PermissionsManager.AreLocationPermissionsGranted(this))
     {
         LocationComponent locationComponent = mapboxMap.LocationComponent;
         locationComponent.ActivateLocationComponent(LocationComponentActivationOptions.InvokeBuilder(this, this.style).Build());
         locationComponent.LocationComponentEnabled = true;
         locationComponent.SetCameraMode(CameraMode.TRACKING, this);
         locationComponent.RenderMode = RenderMode.COMPASS;
     }
 }
예제 #4
0
        public void OnMapReady(MapboxMap p0)
        {
            this.mapboxMap = p0;
            this.mapboxMap.AddOnMapClickListener(this);
            mapboxMap.SetStyle(Style.Dark, new MapboxMapSetStyleListener((style) =>
            {
                LocationComponent locationComponent = mapboxMap.LocationComponent;
                locationComponent.ActivateLocationComponent(this, style);
                locationComponent.LocationComponentEnabled = true;
                locationComponent.RenderMode = RenderMode.Gps;

                mockLocationEngine = new ReplayRouteLocationEngine();
                GetRoute(origin, destination);
            }));
        }
        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();
            }));
        }