Exemplo n.º 1
0
 /**
  * Accepts {@link Stop} List to draw stops on map for specific set of Stop objects.
  *
  * @param stopList - List of Stop objects
  */
 private void drawClosestMapStops(List<Stop> stopList, String address) {
   try {
     mapControl = mainView.getMapControl();
     mapControl.setCenterPosition(mainModel.getSearchGeoPosition(address));
     mapControl.setZoom(2);
     mapControl.addWaypoint(getWayPoints(stopList), stopList);
     mapControl.addHomeWaypoint(mainModel.getSearchWayPoint(address));
     mapControl.getStopsNearHome();
   } catch (ServiceUnavailableException e) {
     mainView.notifyAndExit(MainView.NEXTBUS_SERVICE_UNAVAILABLE);
   } catch (InvalidAddressException e) {
     mainView.updateStatus(MainView.INVALID_ADDRESS);
   }
 }