Accept geojson files with .json extension

This commit is contained in:
Bryan Housel
2017-02-01 23:08:36 -05:00
parent af333dea2b
commit 65d49c87bb

View File

@@ -127,7 +127,7 @@ export function svgGpx(projection, context, dispatch) {
else if (extension === '.kml') {
drawGpx.geojson(toGeoJSON.kml(toDom(data))).fitZoom();
}
else if (extension === '.geojson') {
else if (extension === '.geojson' || extension === '.json') {
drawGpx.geojson(JSON.parse(data)).fitZoom();
}
}
@@ -185,7 +185,7 @@ export function svgGpx(projection, context, dispatch) {
return function (e) {
parseSaveAndZoom(extension, e.target.result);
};
})(f);
})(f);
reader.readAsText(f);
return this;