queryTask.execute(query, new AsyncResponder(onResult, onFault)); function onResult(featureSet:FeatureSet, token:Object = null):void { jsonResults = featureSet.toJSON(); var request:URLRequest = new URLRequest("http://bwiespape/GeotechExample2ASP/simple.aspx"); request.data = { j: jsonResults}; // if you don't need a file back you could just as easily use HTTPService here var fileRef:FileReference = new FileReference(); fileRef.download(request,"report.pdf"); }
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim serializer As JavaScriptSerializer Dim nvc As NameValueCollection = Request.Form Dim responseString As String = nvc("j") serializer = New JavaScriptSerializer() If responseString IsNot Nothing Then Dim results As IDictionary(Of String, Object) = TryCast(serializer.DeserializeObject(responseString), IDictionary(Of String, Object)) If results IsNot Nothing AndAlso results.ContainsKey("features") Then Dim features As IEnumerable(Of Object) = TryCast(results("features"), IEnumerable(Of Object)) For Each feature As IDictionary(Of String, Object) In features Dim attributes As IDictionary(Of String, Object) = TryCast(feature("attributes"), IDictionary(Of String, Object)) Dim project_nu As String = TryCast(attributes("Project_Nu"), String) Dim pointid As String = TryCast(attributes("PointID"), String) Dim east As Double = Decimal.ToDouble(CDec(attributes("East"))) Dim north As Double = Decimal.ToDouble(CDec(attributes("North"))) 'Do Something with your results, array, whatever Next End If End If End Sub
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.