Beispiel #1
0
 public static function geocode($location)
 {
     $geocode = GeocodeModel::lookup($location);
     if (!is_null($geocode)) {
         $geocode = new Geocode($geocode);
         return $geocode->getLatitudeLongitudeType();
     }
     // Geocode was not in database, so perform Geocoding API request.
     $geocode = self::getGeocodeJSON($location);
     if (!is_null($geocode)) {
         $geocode = new Geocode($geocode);
         return $geocode->getLatitudeLongitudeType();
     }
     return null;
 }