Examples of LatLngBounds


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

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

      _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

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

    }

    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

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

  }

  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

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

  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

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

  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

Examples of com.googlecode.maps3.client.LatLngBounds

    mainDock.addNorth(controls, 2);
   
    final MapWidget map = new MapWidget(opts);
    mainDock.add(map);

    LatLngBounds bounds = LatLngBounds.newInstance();
    bounds.extend(LatLng.newInstance(37.660773,-122.534448));
    bounds.extend(LatLng.newInstance(37.860773,-122.334448));
    map.fitBounds(bounds);
   
    // Add the controls
    latLonBox = new TextBox();
    latLonBox.setText("37,-122");
View Full Code Here

Examples of org.primefaces.model.map.LatLngBounds

     
      LatLng center = new LatLng(Double.valueOf(centerLoc[0]), Double.valueOf(centerLoc[1]));
      LatLng northeast = new LatLng(Double.valueOf(northeastLoc[0]), Double.valueOf(northeastLoc[1]));
      LatLng southwest = new LatLng(Double.valueOf(southwestLoc[0]), Double.valueOf(southwestLoc[1]));
     
      map.queueEvent(new StateChangeEvent(map, new LatLngBounds(center, northeast, southwest), zoomLevel));
     
    } else if(params.containsKey(clientId + "_pointSelected")) {
      String[] latlng = params.get(clientId + "_pointLatLng").split(",");
      LatLng position = new LatLng(Double.valueOf(latlng[0]), Double.valueOf(latlng[1]));
     
View Full Code Here

Examples of org.primefaces.model.map.LatLngBounds

                LatLng center = new LatLng(Double.valueOf(centerLoc[0]), Double.valueOf(centerLoc[1]));
                LatLng northeast = new LatLng(Double.valueOf(northeastLoc[0]), Double.valueOf(northeastLoc[1]));
                LatLng southwest = new LatLng(Double.valueOf(southwestLoc[0]), Double.valueOf(southwestLoc[1]));

                wrapperEvent = new StateChangeEvent(this, behaviorEvent.getBehavior(), new LatLngBounds(northeast, southwest), zoomLevel, center);
            }
            else if(eventName.equals("pointSelect")) {
                String[] latlng = params.get(clientId + "_pointLatLng").split(",");
                LatLng position = new LatLng(Double.valueOf(latlng[0]), Double.valueOf(latlng[1]));
View Full Code Here

Examples of org.zkoss.gmaps.LatLngBounds

    final double swlat = ((Number)data.get("swlat")).doubleValue();
    final double swlng = ((Number)data.get("swlng")).doubleValue();
    final double nelat = ((Number)data.get("nelat")).doubleValue();
    final double nelng = ((Number)data.get("nelng")).doubleValue();
    return new MapMoveEvent(request.getCommand(), comp, new LatLng(lat, lng),
        new LatLngBounds( new LatLng(swlat, swlng), new LatLng(nelat, nelng)));
  }
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.