how to download a file from geoserver gml from a url using javascript?
-
how to download a file from geoserver gml from a url using javascript? I'm doing a web application with javascript, but I could not download files from geoserver, the url given entry does not bring any result. enter the url using this instruction: new Ext.form.TextField({ disabled: false, fieldLabel: "URL GML", value:'', id:"Ugml" to save a link: var Ugml = Ext.getCmp('Ugml').getValue() to fetch the data: xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", Ext.getCmp('Ugml').getValue(),true, User="admin",Password="geoserver"); xmlhttp.send(null); alert(xmlhttp.responseXML.xml); any ideas Thanks for your answers
-
Answer:
I would really need to see your URL to comment on why it doesn't work. Have you tried something like http://ian01.geog.psu.edu:80/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&outputFormat=GML2 In general though WFS requests are made using POST (not GET) with an XML payload to handle the request as it is easy to run into URL length limits before the request gets too complex. Finally I'd recommend using OpenLayers and GeoEXT to provide this functionality with well tested code that saves you the work of developing and testing.
ricardo at Geographic Information Systems Visit the source
Related Q & A:
- How To Download Large File From Filesonic?Best solution by ehow.com
- How To Decrypt A File?Best solution by Yahoo! Answers
- How to upload a file to another server using cURL and PHP?Best solution by Stack Overflow
- How to cancel a file upload using an iframe?Best solution by Stack Overflow
- How to get current YouTube video url using JavaScript?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.