<?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 Re: &amp;quot;Snap&amp;quot; point in ArcGISDynamicMapServiceLayer? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-quot-snap-amp-quot-point-in/m-p/184662#M17155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looking back at my own account, I forgot to close out this thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I snapped the point to the line, the hard way. I enumerated all vertices in the line, looking for the closest vertex. Then, I moved the point to that vertex.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will not always give you a good answer, since this will actually snap to the closest vertex, not the closest point along the line. An improvement is to first densify the line (adding points along the line at a given distance interval), which is part of the JS API. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ultimately, most people would just use the SnappingManager with the editor toolbar, but this was a special situation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2014 11:14:56 GMT</pubDate>
    <dc:creator>deleted-user-Jie3eyjOl9XM</dc:creator>
    <dc:date>2014-05-19T11:14:56Z</dc:date>
    <item>
      <title>&amp;quot;Snap&amp;quot; point in ArcGISDynamicMapServiceLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-quot-snap-amp-quot-point-in/m-p/184661#M17154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I doubt this can be done, but maybe someone has some ideas. Using the Javascript API, I want to snap a point to a line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am accessing an ArcGISDynamicMapServiceLayer. It contains polylines, and a query task. I know that I can execute a query to find lines that are close to the point. But, what I need is the EXACT closest point along that line. Is there a simple way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thought is to enumerate all the points along that line, compute the straightline distance, and search for the minimum. But, I don't know how to compute that line to points.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Aug 2010 20:04:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-quot-snap-amp-quot-point-in/m-p/184661#M17154</guid>
      <dc:creator>deleted-user-Jie3eyjOl9XM</dc:creator>
      <dc:date>2010-08-04T20:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: "Snap" point in ArcGISDynamicMapServiceLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-quot-snap-amp-quot-point-in/m-p/184662#M17155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looking back at my own account, I forgot to close out this thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I snapped the point to the line, the hard way. I enumerated all vertices in the line, looking for the closest vertex. Then, I moved the point to that vertex.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will not always give you a good answer, since this will actually snap to the closest vertex, not the closest point along the line. An improvement is to first densify the line (adding points along the line at a given distance interval), which is part of the JS API. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ultimately, most people would just use the SnappingManager with the editor toolbar, but this was a special situation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 11:14:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-quot-snap-amp-quot-point-in/m-p/184662#M17155</guid>
      <dc:creator>deleted-user-Jie3eyjOl9XM</dc:creator>
      <dc:date>2014-05-19T11:14:56Z</dc:date>
    </item>
  </channel>
</rss>

