0

Panoramio 数据 API:

我正在尝试通过以下请求访问来自新西兰的照片 http://www.panoramio.com/map/get_panoramas.php?order=popularity&set=public&from=0&to=10&minx=-33.541395&miny=167.380829&maxx=- 46.498392&maxy=179.817352

上面的 URL 总是返回一个空的内容,如下所述: {"count":271,"has_more":false,"photos":[]}

但是,具有不同坐标的请求可以正常工作,如下所述。 http://www.panoramio.com/map/get_panoramas.php?order=popularity&set=public&from=0&to=10&minx=-124.29382324218749&miny=36.089060460282006&maxx=-119.8773193359375&maxy=38.7240904589569

任何人都可以告诉我,问题是什么以及如何纠正,API是否仅限于任何特定国家?

提前致谢!

4

2 回答 2

1

The url in your example is right but the coordinates are in the middle of pacific ocean where there is no images by panoramio.

You can test it here http://www.panoramio.com/map/#lt=-33.541395&ln=167.380829&z=8&k=2&a=1&tab=1&pl=all

One can also use this fiddle to test your panoramio requests

http://jsfiddle.net/qb0tyyjk/2/

new Request.JSONP({
    url: 'http://www.panoramio.com/map/get_panoramas.php?order=popularity&set=public&from=0&to=10&minx=-124.29382324218749&miny=36.089060460282006&maxx=-119.8773193359375&maxy=38.724090458956965',
    data: {},
    onSuccess: function(response) {
        show_response(response, $('post'));
    }
}).send();

show_response = function(obj, result) {
    $H(obj).each(function(v, k) {
        new Element('li', {
            text: k + ': ' + JSON.stringify(v, null, 4)
        }).inject(result);
    });
    result.highlight();
};
于 2014-09-12T17:13:16.230 回答
0

自然感觉说 minx, maxx 是纬度和 miny, maxy 是经度,但 api 似乎期望 minx, maxx 作为经度和 miny, maxy 作为纬度。因此,尝试交换这些值;意思是尝试点击以下网址 http://www.panoramio.com/map/get_panoramas.php?order=popularity&set=public&from=0&to=10&minx=167.380829&miny=-46.498392&maxx=179.817352&maxy=-33.541395

于 2015-08-16T14:52:21.240 回答