Yahoo Placefinder Geocoding randomly stopped working... Are they not supporting it now?

StackOverflow https://stackoverflow.com/questions/15777371

  •  31-03-2022
  •  | 
  •  

문제

I have a web app that uses Yahoo Geocoding Placefinder API and it was working perfectly until earlier today. It just randomly quit working. Are they not supporting it anymore? I have looked all over the net and I can't find anything about them dropping support, but my code no longer works. Here's my code...

function geocode_yahoo($address,$city,$state,$country) {
    $address = array($address, $city, $state, $country);
    $address = array_filter($address);
    $address = urlencode(implode(', ', $address));

    $appid = 'CYxSRa64';

    $url = 'http://where.yahooapis.com/geocode?location='.$address.'&flags=J&appid='.$appid;
    $data = file_get_contents($url);
    if ($data != '') {
        $data = json_decode($data);
        if ($data && $data->ResultSet && $data->ResultSet->Error == '0' && $data->ResultSet->Found) {
            return (object) array('lat'=>$data->ResultSet->Results[0]->latitude, 'lng'=>$data->ResultSet->Results[0]->longitude); 
        }
    }
    return false;
}
도움이 되었습니까?

해결책

Nothing wrong with your code, the service has simply been stopped.

Note that http://where.yahooapis.com is now returning a 404 page.

The service was set to retire at the end of November 2012 but was left running in order to provide time for developers to migrate to the replacement Yahoo BOSS services: http://developer.yahoo.com/boss/geo/

다른 팁

There is nothing here that states that the service will be stopped: https://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf

In fact, there is a link on the bottom of this page: https://developer.yahoo.com/boss/geo/ to the free YQL version.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top