예제 #1
0
  public GeoBox(GeoPos posTopLeft, GeoPos posBotRight) {

    mLonMin = Math.min(posTopLeft.getLon(), posBotRight.getLon());
    mLonMax = Math.max(posTopLeft.getLon(), posBotRight.getLon());
    mLatMin = Math.min(posTopLeft.getLat(), posBotRight.getLat());
    mLatMax = Math.max(posTopLeft.getLat(), posBotRight.getLat());
  }
예제 #2
0
  public void scale(double scaleFactor) {

    GeoPos center = getCenter();
    double width = getWidth();
    double height = getHeight();

    width *= scaleFactor;
    height *= scaleFactor;

    mLonMin = center.getLon() - width / 2.0;
    mLonMax = center.getLon() + width / 2.0;

    mLatMin = center.getLat() - height / 2.0;
    mLatMax = center.getLat() - height / 2.0;
  }
예제 #3
0
 public boolean geoIsIn(GeoPos pos) {
   return geoIsIn(pos.getLon(), pos.getLat());
 }