<?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: Turn-by-turn directions... display the next step? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661114#M61732</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/122359"&gt;Andrew Gianikas&lt;/A&gt;​ unfortunately I no longer have an android device that I can use to test this. I did test with an Android emulator and it worked fine. For issues like this that are specific to a particular device/platform it might be worth logging an issue with Esri support. They have the resources to troubleshoot this issue with various devices. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Apr 2015 16:16:44 GMT</pubDate>
    <dc:creator>KellyHutchins</dc:creator>
    <dc:date>2015-04-10T16:16:44Z</dc:date>
    <item>
      <title>Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661106#M61724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an app I am working on which displays the map and turn by turn directions, and that is working great.&amp;nbsp; I am also able to track the users current location and display the location along the map route as they progress.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is display the next step in the directions.&amp;nbsp; Is there a way to determine the current step or next step based on the user's current coordinates?&amp;nbsp; I have tried searching for this in forums and checked through the API docs but haven't had any luck yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 15:00:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661106#M61724</guid>
      <dc:creator>AndrewGianikas</dc:creator>
      <dc:date>2015-04-09T15:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661107#M61725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a link to an app that was created by &lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px;"&gt;by Vinicius Machuca for a dev summit challenge.&amp;nbsp; It has code that allows you to toggle through each direction.&amp;nbsp; You can probably use it or modify the code to get the next direction for your app.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif;"&gt;&lt;A href="https://github.com/Esri/100-lines-or-less-js/tree/master/PocketDirections" title="https://github.com/Esri/100-lines-or-less-js/tree/master/PocketDirections"&gt;100-lines-or-less-js/PocketDirections at master · Esri/100-lines-or-less-js · GitHub&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 16px; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif;"&gt;Tom &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 15:39:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661107#M61725</guid>
      <dc:creator>TomSellsted</dc:creator>
      <dc:date>2015-04-09T15:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661108#M61726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tom!&amp;nbsp; I will check this out and let you know how it goes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 17:30:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661108#M61726</guid>
      <dc:creator>AndrewGianikas</dc:creator>
      <dc:date>2015-04-09T17:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661109#M61727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's another app that is a bit old and kind of clunky but shows how to navigate through the direction steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dl.dropboxusercontent.com/u/24627279/Directions.html" style="line-height: 1.5;" title="https://dl.dropboxusercontent.com/u/24627279/Directions.html"&gt;https://dl.dropboxusercontent.com/u/24627279/Directions.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 18:17:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661109#M61727</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-04-09T18:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661110#M61728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kelly.&amp;nbsp; I checked this out... that it is very close but I have to manually swipe to get the next step in the directions.&amp;nbsp; What I am hoping is a possibility is that based on the users current location (I am watching the current location and refreshing the graphic every second) I could some how automatically determine the next step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking since I have a graphic which represents the users location, in there a way to detect an intersection/overlap between the user location graphic and one of the route segments? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 19:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661110#M61728</guid>
      <dc:creator>AndrewGianikas</dc:creator>
      <dc:date>2015-04-09T19:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661111#M61729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many ways to do this but here's a quick proof of concept that shows one approach. Here I wait until the route directions have been generated. Once they are ready I use the Geolocation API to find the current location then check and see if that location is contained within the extent of any of the route features. If it is then I can access the route directions for that feature.&amp;nbsp; For other ways of testing to see if the point is on the route line look into performing a spatial query or using the geometryService (intersect, touches etc) methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14286143402731504 jive_macro_code jive_text_macro" data-renderedposition="134_8_912_16" jivemacro_uid="_14286143402731504"&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on(directionsWidget, "directions-finish", function(e){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var routeFeatures = directionsWidget.directions.features;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; navigator.geolocation.watchPosition(function(position){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locationLayer.clear(); //clear existing location graphic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var location = new Point(position.coords);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Add a test point on the map so we can see the current location&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locationLayer.add(new Graphic(location, new SimpleMarkerSymbol()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.forEach(routeFeatures, function(routeFeature){&lt;/P&gt;&lt;P&gt;&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; var featureExtent = routeFeature.geometry.getExtent();&lt;/P&gt;&lt;P&gt;&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;/P&gt;&lt;P&gt;&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; if(featureExtent.contains(location)){&lt;/P&gt;&lt;P&gt;&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; console.log("Feature within route extent");&lt;/P&gt;&lt;P&gt;&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; //Add the extent graphic for testing so we can see when&lt;/P&gt;&lt;P&gt;&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; // our location is within the extent envelope&lt;/P&gt;&lt;P&gt;&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; locationLayer.add(new Graphic(featureExtent, new SimpleFillSymbol()));&lt;/P&gt;&lt;P&gt;&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; var directions = routeFeature.attributes.text;&lt;/P&gt;&lt;P&gt;&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; var turnType = routeFeature.attributes.maneuverType;&lt;/P&gt;&lt;P&gt;&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; console.log(directions + " " + turnType);&lt;/P&gt;&lt;P&gt;&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;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 21:20:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661111#M61729</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-04-09T21:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661112#M61730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kelly, thank you!&amp;nbsp; If I could give you a high five, I would.&amp;nbsp; I will play around with this (next week) and let you guys know how this goes.&amp;nbsp; Happy Friday!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 15:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661112#M61730</guid>
      <dc:creator>AndrewGianikas</dc:creator>
      <dc:date>2015-04-10T15:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661113#M61731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/2525"&gt;Kelly Hutchins&lt;/A&gt;​, any chance you could take a look at this thread?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/484804"&gt;Issue: Javascript api 3.13, tap on android not opening graphic's infowindow&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When researching this issue I found some solutions posted by you that seemed to work for various older versions of the api but I didn't have any luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 15:43:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661113#M61731</guid>
      <dc:creator>AndrewGianikas</dc:creator>
      <dc:date>2015-04-10T15:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Turn-by-turn directions... display the next step?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661114#M61732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/122359"&gt;Andrew Gianikas&lt;/A&gt;​ unfortunately I no longer have an android device that I can use to test this. I did test with an Android emulator and it worked fine. For issues like this that are specific to a particular device/platform it might be worth logging an issue with Esri support. They have the resources to troubleshoot this issue with various devices. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 16:16:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/turn-by-turn-directions-display-the-next-step/m-p/661114#M61732</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-04-10T16:16:44Z</dc:date>
    </item>
  </channel>
</rss>

