我正试图通过这里的fetch将一个geojson文件加载到我的地图中 https://olive-highfalutin-crown.glitch.me/ 但我没有得到任何显示要加载到我的网络源中的内容。 因此,这就是我的代码:
fetch("https://cdn.glitch.global/5778ed75-793f-41e9-810d-b244bbed9dbd/inkogym.geojson?v=1657180982175") .then(function (response) { return response.json(); }) .then(function (data) { L.geoJSON(data).addTo(map); });
是我的json不正确还是出了什么问题?