Package de.fhpotsdam.unfolding.geo

Examples of de.fhpotsdam.unfolding.geo.Location.div()


  public static Location getEuclideanCentroid(List<Location> locations) {
    Location center = new Location(0, 0);
    for (Location loc : locations) {
      center.add(loc);
    }
    center.div((float) locations.size());
    return center;
  }

  /**
   * Returns the geometric center of the locations of a polygon.
View Full Code Here


  public Location getLocation() {
    Location center = new Location(0, 0);
    for (Marker marker : markers) {
      center.add(marker.getLocation());
    }
    center.div((float) markers.size());
    return center;
  }

  @Override
  public void setLocation(float lat, float lng) {
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.