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

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


          + Math.atan2(Math.sin(tc) * Math.sin(d) * Math.cos(lat1),
              Math.cos(d) - Math.sin(lat1) * Math.sin(lat2));
      LatLng point = LatLng.newInstance(Math.toDegrees(lat2),
          Math.toDegrees(lng2));
      circlePoints[i] = point;
      bounds.extend(point);
      a += step;
    }

    Polygon circle = new Polygon(circlePoints, "green", 0, 0, "#00800", 0.5);
    oldCircle = circle;
View Full Code Here


  private static LatLngBounds getSearchBoundsAsLatLngBounds(double radius) {

    CoordinateBounds bounds = getSearchBounds(radius);

    LatLngBounds b = LatLngBounds.newInstance();
    b.extend(LatLng.newInstance(bounds.getMinLat(), bounds.getMinLon()));
    b.extend(LatLng.newInstance(bounds.getMaxLat(), bounds.getMaxLon()));
    return b;
  }

  private static CoordinateBounds getSearchBounds(double radius) {
View Full Code Here

    CoordinateBounds bounds = getSearchBounds(radius);

    LatLngBounds b = LatLngBounds.newInstance();
    b.extend(LatLng.newInstance(bounds.getMinLat(), bounds.getMinLon()));
    b.extend(LatLng.newInstance(bounds.getMaxLat(), bounds.getMaxLon()));
    return b;
  }

  private static CoordinateBounds getSearchBounds(double radius) {
View Full Code Here

        _mapOverlayManager.addOverlay(marker, 10, 20);
        _overlays.add(marker);

        index++;

        bounds.extend(marker.getLatLng());
      }

      if (!bounds.isEmpty()) {
        MapWidget map = _mapOverlayManager.getMapWidget();
        LatLngBounds currentView = map.getBounds();
View Full Code Here

      _maxTime = Math.max(time, _maxTime);

      LatLng p1 = LatLng.newInstance(bounds.getMinLat(), bounds.getMinLon());
      LatLng p2 = LatLng.newInstance(bounds.getMaxLon(), bounds.getMaxLon());
      LatLngBounds b = LatLngBounds.newInstance();
      b.extend(p1);
      b.extend(p2);

      TimedRegion region = new TimedRegion(b, time);
      _regions.add(region);
View Full Code Here

      LatLng p1 = LatLng.newInstance(bounds.getMinLat(), bounds.getMinLon());
      LatLng p2 = LatLng.newInstance(bounds.getMaxLon(), bounds.getMaxLon());
      LatLngBounds b = LatLngBounds.newInstance();
      b.extend(p1);
      b.extend(p2);

      TimedRegion region = new TimedRegion(b, time);
      _regions.add(region);

      _bounds.extend(p1);
View Full Code Here

  private LatLngBounds getBounds(CoordinateBounds bounds) {

    LatLngBounds b = LatLngBounds.newInstance();

    if (bounds != null) {
      b.extend(LatLng.newInstance(bounds.getMinLat(), bounds.getMinLon()));
      b.extend(LatLng.newInstance(bounds.getMaxLat(), bounds.getMaxLon()));
    }

    return b;
  }
View Full Code Here

    LatLngBounds b = LatLngBounds.newInstance();

    if (bounds != null) {
      b.extend(LatLng.newInstance(bounds.getMinLat(), bounds.getMinLon()));
      b.extend(LatLng.newInstance(bounds.getMaxLat(), bounds.getMaxLon()));
    }

    return b;
  }
}
View Full Code Here

      for (AgencyWithCoverageBean agencyWithCoverage : agencies) {

        final AgencyBean agency = agencyWithCoverage.getAgency();
        final LatLng point = LatLng.newInstance(agencyWithCoverage.getLat(),
            agencyWithCoverage.getLon());
        bounds.extend(point);

        Marker marker = new Marker(point);
        marker.addMarkerClickHandler(new MarkerClickHandler() {
          @Override
          public void onClick(MarkerClickEvent event) {
View Full Code Here

    try {
      double latRadius = Double.parseDouble(tokens[0]) / 2;
      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();
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.