public function longitudeRange($distance) {
    $long = deg2rad($this->longitude());
    $lat = deg2rad($this->latitude());

    $radius = $this->earthRadius($this->latitude());
    $angle = $distance / $radius;
    $diff = asin(sin($angle) / cos($lat));

    $minlong = $long - $diff;
    if ($minlong < -pi()) {
      $minlong = $minlong + pi() * 2;
    }

    $maxlong = $long + $diff;
    if ($maxlong > pi()) {
      $maxlong = $maxlong - pi() * 2;
    }

    return array(
      'min' => rad2deg($minlong),
      'max' => rad2deg($maxlong),
    );
  }