<?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: Find a point at a given distance along a line in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845827#M10345</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can certainly do a "View Source" in your browser to look at the code. &amp;nbsp;It is not a widget. &amp;nbsp;It could be any polyline feature in your app. &amp;nbsp;The demo here allows you to key in a specific value or use the slider to calculate a percent of the total length of the polyline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are five functions that do the calculation for placing the point along the polyline. &amp;nbsp;About 90 lines of code. &amp;nbsp;It can be easily modified for your purposes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Dec 2016 01:02:16 GMT</pubDate>
    <dc:creator>TomSellsted</dc:creator>
    <dc:date>2016-12-30T01:02:16Z</dc:date>
    <item>
      <title>Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845821#M10339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any experience with or sample code or sample geoprocessing events etc. that will return a point X,Y along a line (polyline) given a specific distance? For example if the polyline is 1000 feet long I want to know where along that line 250 feet is from it's starting vertex. I want the results as a point string format&amp;nbsp;{"x" : -118.15, "y" : 33.80, "spatialReference" : {"wkid" : 4326}} so I can mark that location with an image on the web site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 20:13:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845821#M10339</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2016-12-28T20:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845822#M10340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder if this would be a good starting point...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-9065-traverse-widget-220"&gt;https://community.esri.com/docs/DOC-9065-traverse-widget-220&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;find this, other custom widgets and other announcements from the community&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/myAlaskaGIS/2016/03/09/web-appbuilder-developer-edition-customization-resource-list?sr=search&amp;amp;searchId=d596b683-e0bc-40e8-b42c-d3260d0e6c94&amp;amp;searchIndex=0"&gt;/blogs/myAlaskaGIS/2016/03/09/web-appbuilder-developer-edition-customization-resource-list?sr=search&amp;amp;searchId=d596b683-e0bc-40e8-b42c-d3260d0e6c94&amp;amp;searchIndex=0&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2016 20:30:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845822#M10340</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-12-28T20:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845823#M10341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No that's not quite what I'm looking for. Something more along the lines of this:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/polyline.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/polyline.htm"&gt;Polyline—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp; search for &lt;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;positionAlongLine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;I'm looking for the point location along a line. If I provide the polyline feature and a distance it should return the point along the line at that distance. It should take into consideration any curve of the line. The point location will then be used to mark the position on the line where the point occurs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;I'm thinking I need to do this as a geoprocessing service for JS to be able to access it. I've do not have any experience in ArcPy or creating a service for JS to access. I was hoping someone might have utilize the positionAlongLine method in ArcPy and be willing to share their script. That would be a huge start for me. Meanwhile I'm reading and attempting to create this script on my own.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2016 16:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845823#M10341</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2016-12-29T16:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845824#M10342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A GP service was going to be my next suggestion.&amp;nbsp; I have used positionAlongLine in arcpy scripts, but never as a GP service.&amp;nbsp; For example, taking a contour and creating a transect for 1/2 a given length, from the centroid (and shifting if needed), so probably more than what you are needing.&amp;nbsp; But I seem to always have to convert the line to a route.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2016 17:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845824#M10342</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-12-29T17:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845825#M10343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a sample that may work the way you are suggesting. &amp;nbsp;Please take a look at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://gis.yakimawa.gov/demo/positionAlong.html" title="https://gis.yakimawa.gov/demo/positionAlong.html"&gt;Position Along&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is completely client based, so no geoprocessing scripts required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2016 00:44:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845825#M10343</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2016-12-30T00:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845826#M10344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like it!&amp;nbsp; Do you have code you can share? &amp;nbsp;.....or is it already a widget you have out there?&lt;/P&gt;&lt;P&gt;It looks to work with graphics you draw.&amp;nbsp; Do you think it can be modified to work with a feature from a layer?&amp;nbsp; Maybe have to grab and copy first?&amp;nbsp; I could see when this might be useful for some of my projects.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/5472"&gt;Tom Sellsted&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that if I change the value in the box, the slider does not change.&amp;nbsp; Just fyi. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, my numeric pad was acting strange, sometimes taking the numbers, sometimes using the directional functions. btw - using a Desktop Win7, using Firefox, num lock was on.&amp;nbsp; Since it is client side, my guess is it is a client side (user) error/problem.. Again, just an fyi.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2016 00:54:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845826#M10344</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-12-30T00:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845827#M10345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can certainly do a "View Source" in your browser to look at the code. &amp;nbsp;It is not a widget. &amp;nbsp;It could be any polyline feature in your app. &amp;nbsp;The demo here allows you to key in a specific value or use the slider to calculate a percent of the total length of the polyline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are five functions that do the calculation for placing the point along the polyline. &amp;nbsp;About 90 lines of code. &amp;nbsp;It can be easily modified for your purposes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2016 01:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845827#M10345</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2016-12-30T01:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845828#M10346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Tom. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I can extract what I need from what you have provided to create a result that gives me a point X,Y that I can use to mark my location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2016 19:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845828#M10346</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2016-12-30T19:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845829#M10347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are welcome! &amp;nbsp;I had used this method for placing arrows that represent bus locations based on their current schedule. &amp;nbsp;The original code was in ActionScript, but works well in JS too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2017 18:21:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845829#M10347</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2017-01-03T18:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845830#M10348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;Having a small issue. I'm positive its a spatial projection issue. My data is in 26912&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://spatialreference.org/ref/epsg/nad83-utm-zone-12n/" title="http://spatialreference.org/ref/epsg/nad83-utm-zone-12n/"&gt;NAD83 / UTM zone 12N: EPSG Projection -- Spatial Reference&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get this working with my spatial reference? The big difference here is I am querying a polyline from my database and using that as the "var pl" variable. Instead of coming from a line drawn on the map like you do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 01:28:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845830#M10348</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2017-01-06T01:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845831#M10349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the basemap in your app also in that projection? or is it web mercator? &amp;nbsp;If your basemap is in web mercator, you can set the outSpatialReference for the query to web mercator. &amp;nbsp;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #4d4d4d; background: #fafafa; border: 2px solid #dddddd; margin: 0.5em 0.5em 0.5em 0px; padding: 0.5em 0px 0.5em 0.5em;"&gt;&lt;SPAN class="" style="color: #333333; font-weight: bold;"&gt;query.outSpatialReference&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #333333; font-weight: bold;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;SpatialReference&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #009999;"&gt;102100&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 16:44:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845831#M10349</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2017-01-06T16:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845832#M10350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There was also a post from a couple of years ago that uses a similar method, but might work on your projection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/servlet/JiveServlet/download/525576-1-135992/pointAlongLine.txt.zip" title="https://community.esri.com/servlet/JiveServlet/download/525576-1-135992/pointAlongLine.txt.zip"&gt;https://community.esri.com/servlet/JiveServlet/download/525576-1-135992/pointAlongLine.txt.zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 16:56:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845832#M10350</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2017-01-06T16:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845833#M10351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;Thanks for the response, I was able to figure it out and get it working. Still doing some final testing but it's looking great. Again thanks for posting that project it was exactly what I needed.&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 19:24:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845833#M10351</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2017-01-06T19:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845834#M10352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are welcome! &amp;nbsp;Glad you got things working!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 19:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845834#M10352</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2017-01-06T19:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845835#M10353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good stuff！&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 22:25:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845835#M10353</guid>
      <dc:creator>YueWu1</dc:creator>
      <dc:date>2017-01-06T22:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845836#M10354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;I have found a small issue with this method. It seems to always determine the position of the point along the line starting from the "From" point of the line. In some cases I need it to start from the other end of the line the "To" point of the line.&amp;nbsp;How can I change the&amp;nbsp;calculatePositionAlong so that it starts from the TO position and works toward the FROM position? I'm pretty sure I can come up with something that can be used to determine which way to start from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 14:52:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845836#M10354</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2017-03-20T14:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845837#M10355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably the simplest solution would be to&amp;nbsp;reverse the order of the path points in the polyline used. &amp;nbsp;I have updated my &lt;A href="https://gis.yakimawa.gov/demo/positionAlong.html" rel="nofollow noopener noreferrer" target="_blank"&gt;example&lt;/A&gt; to show how to do this. &amp;nbsp;Here is a function that will reverse the path order:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;reversePolylineOrder&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; newPL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Polyline&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; newPath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; pl&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;paths&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;--&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;newPath&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;push&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pl&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getPoint&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; i&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;newPL&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addPath&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;newPath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; newPL&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:22:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845837#M10355</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2021-12-12T10:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845838#M10356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom, thank you for the continued support. This is where I got with what you provide me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a few errors and fixed those by adding&amp;nbsp;&lt;STRONG&gt;geometry&lt;/STRONG&gt; as indicated below. However, after I &amp;nbsp;assign &lt;STRONG style="color: #ff6600;"&gt;pl = newPL&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;pl has no geometry. Which is important because calculatePositionAlong uses it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22px;"&gt;arrayUtils.forEach(&lt;SPAN style="color: #ff0000;"&gt;pl.geometry&lt;/SPAN&gt;.paths[0], function (coords) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I use it to create a new graphic used to display myimage at the found point along the line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN style="font-size: 22px;"&gt;var graphic = new Graphic(pl.geometry, myimage);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22px;"&gt; var newPL = new Polyline(map.spatialReference);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 22px;"&gt; var newPath = [];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 22px;"&gt; for (var i = pl.&lt;STRONG&gt;geometry&lt;/STRONG&gt;.paths[0].length - 1; i &amp;gt;= 0; i--) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 22px;"&gt; newPath.push(pl.&lt;STRONG&gt;geometry&lt;/STRONG&gt;.getPoint(0, i));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 22px;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 22px;"&gt; newPL.addPath(newPath);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 22px;"&gt; &lt;STRONG style="color: #ff6600;"&gt;pl = newPL&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22px;"&gt;&lt;SPAN style="font-size: 15px;"&gt;How can I make sure pl has geometry?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 23:31:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845838#M10356</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2017-03-20T23:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find a point at a given distance along a line</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845839#M10357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late reply. I am on the road today and have limited access to the internet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would set a breakpoint on the last line and then you can examine the values for both the pl and newPL variables. The code looks correct, the pl variable may not have a value set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;46° 36' 17.86"N  120° 30' 18.23"W&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 17:19:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/find-a-point-at-a-given-distance-along-a-line/m-p/845839#M10357</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2017-03-21T17:19:06Z</dc:date>
    </item>
  </channel>
</rss>

