jqGrid from USGS geojson data

旧巷老猫 提交于 2019-11-28 14:14:25

I looked in the documentation of geojson and I think I found the reason of the problem. It seems that GeoJSON(P) uses eqfeed_callback as callback name (see here). So I fixed some options of jqGrid which you used to the following:

url: 'http://earthquake.usgs.gov/earthquakes/feed/geojsonp/2.5/week',
datatype: 'jsonp',
postData: '',
ajaxGridOptions: { jsonp: false, jsonpCallback: 'eqfeed_callback', cache: true},

The modified demo works now and display the results like below

UPDATE: The modified demo uses new URLs of GeoJSON and new version (4.14.1) of free jqGrid.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!