private void QuickStartNavigation() { // Transition to navigation state mapState = MapState.NAVIGATION; cancelNavigationFab.Show(); // Show the InstructionView TransitionManager.BeginDelayedTransition(navigationLayout); instructionView.Visibility = ViewStates.Visible; AdjustMapPaddingForNavigation(); // Updates camera with last location before starting navigating, // making sure the route information is updated // by the time the initial camera tracking animation is fired off // Alternatively, NavigationMapboxMap#startCamera could be used here, // centering the map camera to the beginning of the provided route navigationMap.ResumeCamera(lastLocation); navigation.StartNavigation(route); AddEventToHistoryFile("start_navigation"); // Location updates will be received from ProgressChangeListener RemoveLocationEngineListener(); // TODO remove example usage navigationMap.ResetCameraPositionWith(NavigationCamera.NavigationTrackingModeGps); ICameraUpdate cameraUpdate = CameraOverheadUpdate(); if (cameraUpdate != null) { NavigationCameraUpdate navUpdate = new NavigationCameraUpdate(cameraUpdate); navigationMap.RetrieveCamera().Update(navUpdate); } }
public void Reset() { player = Spawn(alpha, SpawnPosition.X, SpawnPosition.Z); //cameraUpdate = new FollowCamera(sceneManager.Camera, player); cameraUpdate = new AboveCamera(sceneManager.Camera, player); for (int i = 0; i < 2; ++i) { Spawn(helium, Random(10.0f), Random(10.0f)); } }
private void FocustoLocation(LatLng latLng) { if (map == null) { return; } CameraPosition position = new CameraPosition.Builder().Target(latLng).Zoom(SIZE_ZOOM).Build(); ICameraUpdate camera = CameraUpdateFactory.NewCameraPosition(position); map.AnimateCamera(camera); }
/// <summary> /// Unregisters an object from Camera update. /// </summary> public void Unregister(ICameraUpdate _update) => cameraUpdates.Remove(_update);
// ----------------------- /// <summary> /// Registers an object on Camera update. /// </summary> public void Register(ICameraUpdate _update) => cameraUpdates.Add(_update);