Solved! Go to Solution.
Dim endpoint As String = "http://<myurl>/GeocodeServer" Using gc As New ESRI.ArcGIS.ADF.ArcGISServer.GeocodeServerProxy(endpoint) Dim point As New PointN() point.X = X point.Y = Y ' Set reverse geocode search parameters Dim revGeocodeProp As PropertySetProperty = New PropertySetProperty() revGeocodeProp.Key = "ReverseDistanceUnits" revGeocodeProp.Value = "Meters" Dim revGeocodeProp1 As PropertySetProperty = New PropertySetProperty() revGeocodeProp1.Key = "ReverseDistance" revGeocodeProp1.Value = "1000" Dim propArray As PropertySetProperty() = New PropertySetProperty() {revGeocodeProp, revGeocodeProp1} Dim revGeocodePropSet As New ESRI.ArcGIS.ADF.ArcGISServer.PropertySet() revGeocodePropSet.PropertyArray = propArray Dim results As ESRI.ArcGIS.ADF.ArcGISServer.PropertySet = gc.ReverseGeocode(point, True, revGeocodePropSet) ' return JSON string based on results End Using
if(dom.byId("cbIntersect").checked == true){ // make ajax call to find the nearest intersection var qry = 'http://<addressTo.NETSite>/mypage.aspx?x=' + location.x + '&y=' + location.y; $.ajax({ url: qry, type: "get", dataType: "html", error: function() {}, beforeSend: function() {}, complete: function() {}, success: function(strData) { if (JSON.parse(strData) != null && JSON.parse(strData).address != null) { address = JSON.parse(strData).address; location = JSON.parse(strData).location; setInfoWindow(address, location); // this just shows a pop-up window } }}); }
Dim endpoint As String = "http://<myurl>/GeocodeServer" Using gc As New ESRI.ArcGIS.ADF.ArcGISServer.GeocodeServerProxy(endpoint) Dim point As New PointN() point.X = X point.Y = Y ' Set reverse geocode search parameters Dim revGeocodeProp As PropertySetProperty = New PropertySetProperty() revGeocodeProp.Key = "ReverseDistanceUnits" revGeocodeProp.Value = "Meters" Dim revGeocodeProp1 As PropertySetProperty = New PropertySetProperty() revGeocodeProp1.Key = "ReverseDistance" revGeocodeProp1.Value = "1000" Dim propArray As PropertySetProperty() = New PropertySetProperty() {revGeocodeProp, revGeocodeProp1} Dim revGeocodePropSet As New ESRI.ArcGIS.ADF.ArcGISServer.PropertySet() revGeocodePropSet.PropertyArray = propArray Dim results As ESRI.ArcGIS.ADF.ArcGISServer.PropertySet = gc.ReverseGeocode(point, True, revGeocodePropSet) ' return JSON string based on results End Using
if(dom.byId("cbIntersect").checked == true){ // make ajax call to find the nearest intersection var qry = 'http://<addressTo.NETSite>/mypage.aspx?x=' + location.x + '&y=' + location.y; $.ajax({ url: qry, type: "get", dataType: "html", error: function() {}, beforeSend: function() {}, complete: function() {}, success: function(strData) { if (JSON.parse(strData) != null && JSON.parse(strData).address != null) { address = JSON.parse(strData).address; location = JSON.parse(strData).location; setInfoWindow(address, location); // this just shows a pop-up window } }}); }