Пример #1
0
  /**
   * Accepts Route Tag value to retrieve Route object. Gets list of GeoPosition points using Route
   * object. Draws route on map based on retrieved GeoPosition points.
   *
   * @param routeTag - Route Object Tag value (String)
   */
  private void drawMapRoute(String routeTag) {
    try {
      Route route = mainModel.getRoute(routeTag);
      RouteConfig routeConfig = mainModel.getRouteConfig(route);
      ArrayList<Path> ttfPaths = mainModel.getPathList(route);

      mapControl = mainView.getMapControl();
      mapControl.drawRoute(routeConfig, ttfPaths);
      mapControl.getAllOverlays();

      mainView.updateMapViewer();
    } catch (ServiceUnavailableException e) {
      mainView.notifyAndExit(MainView.NEXTBUS_SERVICE_UNAVAILABLE);
    }
  }
Пример #2
0
 /**
  * Accepts {@link Stop} List to draw stops on map for specific set of Stop objects.
  *
  * @param stopList - List of Stop objects
  */
 private void drawMapStops(List<Stop> stopList) {
   mapControl = mainView.getMapControl();
   mapControl.addWaypoint(getWayPoints(stopList), stopList);
   mapControl.getAllOverlays();
 }