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

Examples of com.google.gwt.maps.client.geom.LatLngBounds.extend()


      double lonRadius = Double.parseDouble(tokens[1]) / 2;

      LatLngBounds bounds = LatLngBounds.newInstance();
      bounds.extend(LatLng.newInstance(center.getLatitude() + latRadius,
          center.getLongitude() + lonRadius));
      bounds.extend(LatLng.newInstance(center.getLatitude() - latRadius,
          center.getLongitude() - lonRadius));

      MapWidget map = _widget.getMapWidget();
      return map.getBoundsZoomLevel(bounds);
    } catch (NumberFormatException ex) {
View Full Code Here


          LatLng point = LatLng.newInstance(stop.getLat(), stop.getLon());
          TinyInfoWindowMarker marker = new TinyInfoWindowMarker(point, w);
          resultingOverlays.add(marker);

          bounds.extend(point);
        }
      } else if (mode.equals("walk")) {
        List<StreetLegBean> streetLegs = segment.getStreetLegs();
        List<CoordinatePoint> allPoints = new ArrayList<CoordinatePoint>();
        for (StreetLegBean streetLeg : streetLegs) {
View Full Code Here

      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);
View Full Code Here

        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

    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)
View Full Code Here

  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

    _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
Copyright © 2018 www.massapi.com. 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.