private void doFocusChange(ObaStop stop) { mMarkerData.setFocus(stop); HashMap<String, ObaRoute> routes = mMarkerData.getCachedRoutes(); // Notify listener mOnFocusChangedListener.onFocusChanged(stop, routes, stop.getLocation()); }
/** * Removes the stop focus and notify listener * * @param latLng the location on the map where the user tapped if the focus change was triggered * by the user tapping on the map, or null if the focus change was otherwise triggered * programmatically. */ private void removeFocus(LatLng latLng) { if (mMarkerData.getFocus() != null) { mMarkerData.removeFocus(); } // Set map clicked location, if it exists Location location = null; if (latLng != null) { location = MapHelpV2.makeLocation(latLng); } // Notify focus changed every time the map is clicked away from a stop marker mOnFocusChangedListener.onFocusChanged(null, null, location); }