<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Snap to Intersection in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176937#M16416</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am working on a web app to allow users to reverse geocode addresses. Using the samples, I have been able to do this with non-intersections, but at times the users will want to click on the map and return an intersection address (ie W 4th St AND Pine St).&amp;nbsp; Is there a way to 'snap to' an intersection, or select the nearest intersection? I've looked through the samples and I've not found what I'm looking for.&amp;nbsp; Any help/advice would be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Oct 2013 22:04:20 GMT</pubDate>
    <dc:creator>RayEvans</dc:creator>
    <dc:date>2013-10-21T22:04:20Z</dc:date>
    <item>
      <title>Snap to Intersection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176937#M16416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am working on a web app to allow users to reverse geocode addresses. Using the samples, I have been able to do this with non-intersections, but at times the users will want to click on the map and return an intersection address (ie W 4th St AND Pine St).&amp;nbsp; Is there a way to 'snap to' an intersection, or select the nearest intersection? I've looked through the samples and I've not found what I'm looking for.&amp;nbsp; Any help/advice would be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 22:04:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176937#M16416</guid>
      <dc:creator>RayEvans</dc:creator>
      <dc:date>2013-10-21T22:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Snap to Intersection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176938#M16417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;the REST spec for geocode.arcgis.com for &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Reverse_geocoding/02r30000000n000000/"&gt;reverseGeocoding&lt;/A&gt;&lt;SPAN&gt; doesn't seem to include any parameters to specify that you want an intersection as opposed to an interpolated address, so im not sure how you'd accomplish something like that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'snapping' itself wouldn't be a relevant solution unless you loaded your entire collection of reference data into the application as graphics layers, which would probably be pretty cumbersome.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 15:29:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176938#M16417</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-10-22T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Snap to Intersection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176939#M16418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for the info, I was afraid that might be the case, luckily, the web app is a .NET web app, so I was able to make an AJAX call to a page that takes the coordinates for the address that was clicked and returns the nearest intersection.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For anyone else looking to do the same, here's basically what I did&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.NET Code behind, takes an X and Y (as double)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim endpoint As String = "http://&amp;lt;myurl&amp;gt;/GeocodeServer" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using gc As New ESRI.ArcGIS.ADF.ArcGISServer.GeocodeServerProxy(endpoint) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim point As New PointN() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.X = X &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point.Y = Y &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Set reverse geocode search parameters &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim revGeocodeProp As PropertySetProperty = New PropertySetProperty() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; revGeocodeProp.Key = "ReverseDistanceUnits" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; revGeocodeProp.Value = "Meters"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim revGeocodeProp1 As PropertySetProperty = New PropertySetProperty() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; revGeocodeProp1.Key = "ReverseDistance" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; revGeocodeProp1.Value = "1000" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim propArray As PropertySetProperty() = New PropertySetProperty() {revGeocodeProp, revGeocodeProp1} &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim revGeocodePropSet As New ESRI.ArcGIS.ADF.ArcGISServer.PropertySet() &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; revGeocodePropSet.PropertyArray = propArray&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim results As ESRI.ArcGIS.ADF.ArcGISServer.PropertySet = gc.ReverseGeocode(point, True, revGeocodePropSet)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' return JSON string based on results&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Using&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Javascript code, after the location-to-address completes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(dom.byId("cbIntersect").checked == true){ &amp;nbsp;&amp;nbsp;&amp;nbsp; // make ajax call to find the nearest intersection &amp;nbsp;&amp;nbsp;&amp;nbsp; var qry = 'http://&amp;lt;addressTo.NETSite&amp;gt;/mypage.aspx?x=' + location.x + '&amp;amp;y=' + location.y; &amp;nbsp;&amp;nbsp;&amp;nbsp; $.ajax({ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: qry, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type: "get", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataType: "html", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error: function() {}, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beforeSend: function() {}, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; complete: function() {}, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; success: function(strData) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (JSON.parse(strData) != null &amp;amp;&amp;amp; JSON.parse(strData).address != null) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; address = JSON.parse(strData).address; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; location = JSON.parse(strData).location; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setInfoWindow(address, location); // this just shows a pop-up window &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }}); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 15:45:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176939#M16418</guid>
      <dc:creator>RayEvans</dc:creator>
      <dc:date>2013-10-22T15:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Snap to Intersection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176940#M16419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yup.&amp;nbsp; the reverseGeocode operation in SOAP definitely allows you to pass a boolean asking specifically for intersections.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Geocode service ReverseGeocode method - ReturnIntersection&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/soap/10.2/#/ReverseGeocode/01vp000000n6000000/"&gt;http://resources.arcgis.com/en/help/soap/10.2/#/ReverseGeocode/01vp000000n6000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;nice work!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 16:28:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/snap-to-intersection/m-p/176940#M16419</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-10-22T16:28:52Z</dc:date>
    </item>
  </channel>
</rss>

