Comments (4)
Can somebody give me a tip on how to handle this error when using XMLHttpRequest?
Below is the code I'm using. With it I'm able to open a download window with the zipped shapefile, but when I change the format to DXF I receive the error mentioned above.
var http = new XMLHttpRequest();
var url = "http://ogre.adc4gis.com/convertJson";
var params = "json=" + JSON.stringify(resultAsGeojson) +
"&skipFailures=" + true +
"&format=" + "DXF";
http.open("POST", url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.onreadystatechange = function() {//Call a function when the state changes.
var a;
if(http.readyState == 4 && http.status == 200) {
a = document.createElement('a');
a.href = window.URL.createObjectURL(http.response);
a.download = "test-file.zip";
a.style.display = 'none';
document.body.appendChild(a);
a.click()
}
}
http.responseType = 'blob';
http.send(params);
I am very new to js, so thanks in advance!
from ogre.
The online version still has this issue unsolved, so DXF format is broken. Check this PR #87 if you want to try running your own instance.
from ogre.
This fix has been released, thx again @GastonZalba !
from ogre.
That's great, thank you!
from ogre.
Related Issues (20)
- outputName param is not working HOT 1
- Issue while converting a shapefile to geojson HOT 3
- Converting from CSV: Geometry not being structured correctly HOT 2
- /convertJson returning 400 HOT 3
- DeprecationWarning: Invalid 'main' field in HOT 6
- stdout maxBuffer length exceeded HOT 3
- No sign of downloaded zip after using ogre POST HOT 2
- GeoJSON to shp FeatureCollection error HOT 3
- Support for flags like -dialect sqlite -sql, to extract styles HOT 1
- DXF to GeoJson not all layers converted HOT 5
- Use ogre directly from another Script (without API) HOT 5
- Features from all layers get thrown into 1 layer HOT 2
- Random response structure in GeoJson format. HOT 1
- Convert to GeoJSON HOT 2
- /convert endpoint broken HOT 12
- Export to DGN HOT 9
- Stdout maxbuffer length exceeded while converting to geojson HOT 3
- HTTP Post Unexpected Field HOT 2
- /convert unable to convert .zip files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ogre.