<?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 Routing Exception in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/routing-exception/m-p/231692#M2777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get a route and directions between two points on a map. I have created a Runtime Content that includes a Network Dataset. The route will solve without using directions, but when I set ReturnDirections to true, I get a message that the Directions Time Attribute is invalid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directions have been set up in the Network Dataset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what the Directions tab looks like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directions Ready: Yes&lt;/P&gt;&lt;P&gt;General Directions: &lt;/P&gt;&lt;P&gt;Display Length Units: Miles&lt;/P&gt;&lt;P&gt;Length Attribute: Miles&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Time Attribute: Seconds&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a code snippit:&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LocalRouteTask routeTask;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeTask = await Task.Run&amp;lt;LocalRouteTask&amp;gt;(() =&amp;gt; new LocalRouteTask(runtimeGeodatabaseNetworkPath, "STREETS_ND"));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var routeParams = await routeTask.GetDefaultParametersAsync();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeParams.OutSpatialReference = MyMapView.SpatialReference;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeParams.DirectionsLengthUnit = LinearUnits.Miles;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeParams.ReturnDirections = true;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// If I set ReturnDirections to false it works&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//routeParams.ReturnDirections = false;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var stopGraphics = new List&amp;lt;Graphic&amp;gt;();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;stopGraphics.Add(fromMapGraphic);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;stopGraphics.Add(toMapGraphic);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeParams.SetStops(stopGraphics);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//Exception happens on this line&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var routeResult = await routeTask.SolveAsync(routeParams);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Exception is : {"Invalid directions time attribute: '{0}'."}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ----------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Mar 2016 21:41:59 GMT</pubDate>
    <dc:creator>GreggCountryman1</dc:creator>
    <dc:date>2016-03-03T21:41:59Z</dc:date>
    <item>
      <title>Routing Exception</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/routing-exception/m-p/231692#M2777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get a route and directions between two points on a map. I have created a Runtime Content that includes a Network Dataset. The route will solve without using directions, but when I set ReturnDirections to true, I get a message that the Directions Time Attribute is invalid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directions have been set up in the Network Dataset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what the Directions tab looks like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directions Ready: Yes&lt;/P&gt;&lt;P&gt;General Directions: &lt;/P&gt;&lt;P&gt;Display Length Units: Miles&lt;/P&gt;&lt;P&gt;Length Attribute: Miles&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Time Attribute: Seconds&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a code snippit:&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LocalRouteTask routeTask;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeTask = await Task.Run&amp;lt;LocalRouteTask&amp;gt;(() =&amp;gt; new LocalRouteTask(runtimeGeodatabaseNetworkPath, "STREETS_ND"));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var routeParams = await routeTask.GetDefaultParametersAsync();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeParams.OutSpatialReference = MyMapView.SpatialReference;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeParams.DirectionsLengthUnit = LinearUnits.Miles;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeParams.ReturnDirections = true;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// If I set ReturnDirections to false it works&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//routeParams.ReturnDirections = false;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var stopGraphics = new List&amp;lt;Graphic&amp;gt;();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;stopGraphics.Add(fromMapGraphic);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;stopGraphics.Add(toMapGraphic);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;routeParams.SetStops(stopGraphics);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//Exception happens on this line&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var routeResult = await routeTask.SolveAsync(routeParams);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Exception is : {"Invalid directions time attribute: '{0}'."}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ----------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 21:41:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/routing-exception/m-p/231692#M2777</guid>
      <dc:creator>GreggCountryman1</dc:creator>
      <dc:date>2016-03-03T21:41:59Z</dc:date>
    </item>
  </channel>
</rss>

