Package com.google.gwt.maps.client.geom

Examples of com.google.gwt.maps.client.geom.LatLngBounds


      if (model.getLocation() == null) {

        PlaceSearch search = new PlaceSearch();

        LatLngBounds view = LatLngBounds.newInstance();
        view.extend(LatLng.newInstance(47.97430795395781, -121.79454591726969));
        view.extend(LatLng.newInstance(47.152554314370924, -122.50104172828858));

        search.query(model.getLocationQuery(), new GeocoderResultHandler(),
            view);

      } else {
View Full Code Here


      _visibleStopsById.keySet().retainAll(_stopIdsToAlwaysShow);
    }
  }

  private CoordinateBounds computeBounds() {
    LatLngBounds r = _map.getBounds();
    LatLng ne = r.getNorthEast();
    LatLng sw = r.getSouthWest();

    double latMin = sw.getLatitude();
    double lonMin = sw.getLongitude();
    double latMax = ne.getLatitude();
    double lonMax = ne.getLongitude();
View Full Code Here

    }

    if (centerViewOnRoute) {
      System.out.println("center on route");
      // Center the map on the bounds of the route
      LatLngBounds bounds = LatLngBounds.newInstance();
      for (StopBean stop : stopsForRoute.getStops())
        bounds.extend(LatLng.newInstance(stop.getLat(), stop.getLon()));

      if (!bounds.isEmpty()) {
        int zoomLevel = _map.getBoundsZoomLevel(bounds);
        _map.setCenter(bounds.getCenter(), zoomLevel);
      }
    }
  }
View Full Code Here

  }

  public void showPlaces(List<Place> places, boolean showStopsInCurrentView,
      PlaceClickHandler clickHandler) {

    LatLngBounds bounds = LatLngBounds.newInstance();
    for (Place place : places)
      bounds.extend(place.getLocation());
    if (!bounds.isEmpty())
      _map.setCenter(bounds.getCenter(), _map.getBoundsZoomLevel(bounds));

    reset(showStopsInCurrentView);
    for (Place place : places)
      addPlaceToMap(place, clickHandler);
  }
View Full Code Here

  private Marker _currentLocationMarker = null;

  public void showStopsForRoute(RouteBean route, StopsForRouteBean stopsForRoute) {
    _transitMapManager.showStopsForRoute(route, stopsForRoute, true);
    LatLngBounds b = LatLngBounds.newInstance();
    for (StopBean stop : stopsForRoute.getStops())
      b.extend(LatLng.newInstance(stop.getLat(), stop.getLon()));
    if (!b.isEmpty()) {
      _map.setCenter(b.getCenter(), _map.getBoundsZoomLevel(b));
      _locationManager.setLastSearchLocation(b.getCenter());
    }
  }
View Full Code Here

  public void showPlaces(List<Place> places) {
    _transitMapManager.showPlaces(places, false,
        new PlaceClickHandlerImpl(true));

    LatLngBounds b = LatLngBounds.newInstance();
    for (Place place : places)
      b.extend(place.getLocation());

    if (!b.isEmpty())
      _locationManager.setLastSearchLocation(b.getCenter());
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.maps.client.geom.LatLngBounds

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.