<?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 ROUTE TASK - GET DRIVING DIRECTIONS TO an XY COORDINATE in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190909#M17613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sure this is possible. If you look at the 'Get Driving Directions' sample you'll see that the input address is geocoded and the x,y values of the best match are used to create a new graphic which is are used as the inputs to the route task. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; if (type === "from") {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; routeParams.stops.features[0] = map.graphics.add(new esri.Graphic(stop.location, fromSymbol, { address:stop.address, score:stop.score }));
&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; else if (type === "to") {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; routeParams.stops.features[1] = map.graphics.add(new esri.Graphic(stop.location, toSymbol, { address:stop.address, score:stop.score }));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the above code you can replace stop.location with a new point that contains the lat,lon values instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:36:10 GMT</pubDate>
    <dc:creator>KellyHutchins</dc:creator>
    <dc:date>2021-12-11T09:36:10Z</dc:date>
    <item>
      <title>ROUTE TASK - GET DRIVING DIRECTIONS TO an XY COORDINATE</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190908#M17612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need a interactive map for all our trails and trailheads on top of Bing Map or the ESRI Street Map. The user would need to get driving directions to the trails from a static Address, which will be our address for City Hall. I will start with the "Get Driving Directions" sample- is it possible to use a lat/long instead of an actual address?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 19:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190908#M17612</guid>
      <dc:creator>JuneAcosta</dc:creator>
      <dc:date>2010-04-14T19:47:20Z</dc:date>
    </item>
    <item>
      <title>ROUTE TASK - GET DRIVING DIRECTIONS TO an XY COORDINATE</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190909#M17613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sure this is possible. If you look at the 'Get Driving Directions' sample you'll see that the input address is geocoded and the x,y values of the best match are used to create a new graphic which is are used as the inputs to the route task. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; if (type === "from") {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; routeParams.stops.features[0] = map.graphics.add(new esri.Graphic(stop.location, fromSymbol, { address:stop.address, score:stop.score }));
&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; else if (type === "to") {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; routeParams.stops.features[1] = map.graphics.add(new esri.Graphic(stop.location, toSymbol, { address:stop.address, score:stop.score }));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the above code you can replace stop.location with a new point that contains the lat,lon values instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:36:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190909#M17613</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-11T09:36:10Z</dc:date>
    </item>
    <item>
      <title>ROUTE TASK - GET DRIVING DIRECTIONS TO an XY COORDINATE</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190910#M17614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kelly,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks I got it to map the lat/lon, but what do I replace the "{ address:stop.address, score:stop.score }" with since I am not gecoding an a real address?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 16:14:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190910#M17614</guid>
      <dc:creator>JuneAcosta</dc:creator>
      <dc:date>2010-04-20T16:14:01Z</dc:date>
    </item>
    <item>
      <title>ROUTE TASK - GET DRIVING DIRECTIONS TO an XY COORDINATE</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190911#M17615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This text is displayed in the direction info - you could associate a location name rather than address if you wish, for example if I wanted driving directions to display ESRI Redlands and San Diego convention center instead of an address I could&amp;nbsp; add an address attribute with the following information:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
var fromLoc = new esri.geometry.Point( -117.194958859564,34.0573637535114,map.spatialReference);
routeParams.stops.features[0] = map.graphics.add(new esri.Graphic(fromLoc, fromSymbol,{address:"ESRI Redlands"}));

var toLoc = new esri.geometry.Point(-117.163797351249,32.7075263536336,map.spatialReference);&amp;nbsp;&amp;nbsp; routeParams.stops.features[1] = map.graphics.add(new esri.Graphic(toLoc, toSymbol,{address:"San Diego Convention Center"}));&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:36:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/route-task-get-driving-directions-to-an-xy/m-p/190911#M17615</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-11T09:36:13Z</dc:date>
    </item>
  </channel>
</rss>

