调用 geonames 最近的地震 web 服务

Posted

技术标签:

【中文标题】调用 geonames 最近的地震 web 服务【英文标题】:Calling geonames recent earthquakes webservice 【发布时间】:2011-11-28 02:25:23 【问题描述】:

我有一个地方的经度/纬度坐标。 如何使用参数调用以下 Web 服务:北、南、东、西。 有任何想法吗?谢谢!

Recent Earthquakes
Webservice Type : REST
Url : api.geonames.org/earthquakesJSON?
Parameters : north,south,east,west : coordinates of bounding box
callback : name of javascript function (optional parameter)
date : date of earthquakes 'yyyy-MM-dd', optional parameter, earthquakes older or equal the given date sorted by date,magnitude
minMagnitude : minimal magnitude, optional parameter
maxRows : maximal number of rows returned (default = 10)

Result : returns a list of earthquakes, ordered by magnitude

Example http://api.geonames.org/earthquakesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo

【问题讨论】:

developer.mozilla.org/en/AJAX 【参考方案1】:

您不能使用 ajax 来获取不在您的域中的页面。您可以在自己的服务器上代理请求(注意这一点,只允许显式列入白名单的域),或者如果 Web 服务支持,则必须使用 JSONP。

【讨论】:

以上是关于调用 geonames 最近的地震 web 服务的主要内容,如果未能解决你的问题,请参考以下文章

使用 PostGIS 查找给定点的 n 个最近邻?

如何在地理名称和地理编码器 api 中动态生成边界框

mootools 请求类和 CORS

如何使用https进行Geonames API?

四月森林火灾地震频发,感恩奋战在一线的最可爱的人

比较早,就布局了地震属性计算与机器学习下的地震相划分