public void OnMapReady(MapboxMap mapboxMap) { this.mapboxMap = mapboxMap; mapboxMap.SetOnMapClickListener(this); locationLayerPlugin = new LocationLayerPlugin(mapView, mapboxMap, null); locationLayerPlugin.SetLocationLayerEnabled(LocationLayerMode.Navigation); // Setup the mockLocationEngine mockLocationEngine = new MockLocationEngine(1000, 30, false); mockLocationEngine.AddLocationEngineListener(this); navigation.LocationEngine = (mockLocationEngine); // Acquire the navigation route GetRoute(origin, destination, null); }
public void OnMapReady(MapboxMap mapboxMap) { this.mapboxMap = mapboxMap; locationLayerPlugin = new LocationLayerPlugin(mapView, mapboxMap, null); locationLayerPlugin.SetLocationLayerEnabled(LocationLayerMode.Navigation); navigationMapRoute = new NavigationMapRoute(navigation, mapView, mapboxMap); mapboxMap.SetOnMapClickListener(this); Snackbar.Make(mapView, "Tap map to place waypoint", BaseTransientBottomBar.LengthLong).Show(); locationEngine = new MockLocationEngine(1000, 50, true); mapboxMap.SetLocationSource(locationEngine); NewOrigin(); }
private void InitLocationLayer() { locationLayer = new LocationLayerPlugin(mapView, mapboxMap, locationEngine); locationLayer.SetLocationLayerEnabled(LocationLayerMode.Compass); }