Package org.onebusaway.webapp.gwt.common.control

Examples of org.onebusaway.webapp.gwt.common.control.Place


  @Override
  public void onSuccess(JsArray<Placemark> placemarks) {

    for (int i = 0; i < placemarks.length(); i++) {
      Placemark mark = placemarks.get(i);
      Place place = getPlacemarkAsPlace(mark);
      _addresses.add(place);
      System.out.println("address=" + place);
    }

    _addressResultsReceived = true;
View Full Code Here


  }

  private List<Place> consolidatePlaces(List<Place> places) {

    for (Iterator<Place> it = places.iterator(); it.hasNext();) {
      Place place = it.next();
      if (place.getName() == null)
        it.remove();
    }

    // Merge nearby place results that are very similar
    places = PlaceSearch.mergeNearbyEntries(places, PLACE_MERGE_DISTANCE);

    List<Place> placesInRange = new ArrayList<Place>();
    if (_bounds != null) {
      for (Place place : places) {
        if (_bounds.containsLatLng(place.getLocation()))
          placesInRange.add(place);
      }
    }

    if (!placesInRange.isEmpty())
View Full Code Here

    return places;
  }

  private void consolidatePlacesNearAddresses() {
    for (Iterator<Place> it = _places.iterator(); it.hasNext();) {
      Place place = it.next();
      for (Place address : _addresses) {
        double distance = place.getLocation().distanceFrom(
            address.getLocation());
        if (distance < PLACE_MERGE_DISTANCE) {
          it.remove();
          continue;
        }
View Full Code Here

      _service.getStopsForRoute(route.getId(), new StopsForRouteCallback(route));
    } else if (primary instanceof StopBean) {
      StopBean stop = (StopBean) primary;
      _transitMapManager.showStop(stop, true);
    } else if (primary instanceof Place) {
      Place place = (Place) primary;
      _transitMapManager.showPlace(place, true, null);
    }
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.webapp.gwt.common.control.Place

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.