public void OnMapReady(MapboxMap mapboxMap) { this.mapboxMap = mapboxMap; navigationMapRoute = new NavigationMapRoute(null, mapView, mapboxMap, "admin-3-4-boundaries-bg"); Gson gson = new GsonBuilder().RegisterTypeAdapterFactory(DirectionsAdapterFactory.Create()).Create(); var json = loadJsonFromAsset(DIRECTIONS_RESPONSE); DirectionsResponse response = (DirectionsResponse)gson.FromJson(json, Class.FromType(typeof(DirectionsResponse))); navigationMapRoute.AddRoute(response.Routes()[0]); mapboxMap.SetOnMapLongClickListener(this); navigationMapRoute.SetOnRouteSelectionChangeListener(this); }
private void InitMapRoute() { mapRoute = new NavigationMapRoute(mapView, mapboxMap); mapRoute.SetOnRouteSelectionChangeListener(this); }
private void InitMapRoute() { mapRoute = new NavigationMapRoute(mapView, mapboxMap, "admin-3-4-boundaries-bg"); mapRoute.SetOnRouteSelectionChangeListener(this); }