Мне нужно загрузить файл Geojson из папки «App_Data» ASP.NET MVC и использовать его в d3.json.
d3.json("@Server.MapPath("~/App_Data/data/afile.geojson")", function (error, geodata) {
if (error) return console.log(error);
features.selectAll("path")
.data(geodata.features)
...
}
Я вижу ошибку:
error { target: XMLHttpRequest, isTrusted: true, lengthComputable: false, loaded: 0, total: 0, currentTarget: XMLHttpRequest, eventPhase: 2, bubbles: false, cancelable: false, defaultPrevented: false, … }
В «Просмотр источника страницы»:
d3.json("C:\Users\user\Documents\Visual Studio 2013\Projects\ASP.NET\app\app\App_Data\data\afile.geojson", function (error, geodata) {
if (error) return console.log(error);
...
}
Как с этим справиться?