/** * Updates vehicles for the provided routeIds from the status info from the given * ObaTripsForRouteResponse * * @param routeIds routeIds for which to add vehicle markers to the map. If a vehicle is running a * route that is not contained in this list, the vehicle won't be shown on the map. * @param response response that contains the real-time status info */ public void updateVehicles(HashSet<String> routeIds, ObaTripsForRouteResponse response) { // Make sure that the MarkerData has been initialized setupMarkerData(); // Cache the response, so when a marker is tapped we can look up route names from routeIds, etc. mLastResponse = response; // Show the markers on the map mMarkerData.populate(routeIds, response); }
private void populate(List<ObaStop> stops, List<ObaRoute> routes) { // Make sure that the MarkerData has been initialized setupMarkerData(); mMarkerData.populate(stops, routes); }