<?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 drive area in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/drive-area/m-p/627194#M4224</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm trying to try out the drive area feature, and i am getting null features back.&amp;nbsp; I'm using code from the sample on this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code snippet:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// default value&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;double &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue1 &lt;/SPAN&gt;= &lt;SPAN style="color: #0000ff;"&gt;2.0&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue2 &lt;/SPAN&gt;= &lt;SPAN style="color: #0000ff;"&gt;5.0&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue3 &lt;/SPAN&gt;= &lt;SPAN style="color: #0000ff;"&gt;10.0&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ServiceAreaParameters sap = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ServiceAreaParameters();&lt;/P&gt;&lt;P&gt;NAFeaturesAsFeature nfaf = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;NAFeaturesAsFeature();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Convert point to EGS (decimal degrees)&lt;BR /&gt;&lt;/SPAN&gt;Point p = (Point) GeometryEngine&lt;/P&gt;&lt;P&gt;&amp;nbsp; .&lt;SPAN style="font-style: italic;"&gt;project&lt;/SPAN&gt;(startLocation, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;wm&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;egs&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;nfaf.addFeature(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic(p, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;));&lt;/P&gt;&lt;P&gt;sap.setFacilities(nfaf);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Set the service area output SR to our map service's SR&lt;BR /&gt;&lt;/SPAN&gt;sap.setOutSpatialReference(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;wm&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Set the default break values with our entered values&lt;BR /&gt;&lt;/SPAN&gt;sap.setImpedanceAttributeName(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"TravelTime"&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;sap.setDefaultBreaks(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Double[]{&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue1&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue2&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue3&lt;/SPAN&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Create a new service area task pointing to an NAService&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// (null credentials -&amp;gt; free service)&lt;BR /&gt;&lt;/SPAN&gt;ServiceAreaTask sat = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ServiceAreaTask(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mDriveAreaServiceURL&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mCredentials&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Solve the service area and retrieve the result.&lt;BR /&gt;&lt;/SPAN&gt;ServiceAreaResult saResult = sat.solve(sap);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;return &lt;/SPAN&gt;saResult;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 20:29:20 GMT</pubDate>
    <dc:creator>AlexBlanco</dc:creator>
    <dc:date>2015-08-07T20:29:20Z</dc:date>
    <item>
      <title>drive area</title>
      <link>https://community.esri.com/t5/developers-questions/drive-area/m-p/627194#M4224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm trying to try out the drive area feature, and i am getting null features back.&amp;nbsp; I'm using code from the sample on this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code snippet:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// default value&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;double &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue1 &lt;/SPAN&gt;= &lt;SPAN style="color: #0000ff;"&gt;2.0&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue2 &lt;/SPAN&gt;= &lt;SPAN style="color: #0000ff;"&gt;5.0&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue3 &lt;/SPAN&gt;= &lt;SPAN style="color: #0000ff;"&gt;10.0&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ServiceAreaParameters sap = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ServiceAreaParameters();&lt;/P&gt;&lt;P&gt;NAFeaturesAsFeature nfaf = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;NAFeaturesAsFeature();&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Convert point to EGS (decimal degrees)&lt;BR /&gt;&lt;/SPAN&gt;Point p = (Point) GeometryEngine&lt;/P&gt;&lt;P&gt;&amp;nbsp; .&lt;SPAN style="font-style: italic;"&gt;project&lt;/SPAN&gt;(startLocation, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;wm&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;egs&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;nfaf.addFeature(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Graphic(p, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;));&lt;/P&gt;&lt;P&gt;sap.setFacilities(nfaf);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Set the service area output SR to our map service's SR&lt;BR /&gt;&lt;/SPAN&gt;sap.setOutSpatialReference(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;wm&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Set the default break values with our entered values&lt;BR /&gt;&lt;/SPAN&gt;sap.setImpedanceAttributeName(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"TravelTime"&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;sap.setDefaultBreaks(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Double[]{&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue1&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue2&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;breakValue3&lt;/SPAN&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Create a new service area task pointing to an NAService&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// (null credentials -&amp;gt; free service)&lt;BR /&gt;&lt;/SPAN&gt;ServiceAreaTask sat = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ServiceAreaTask(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mDriveAreaServiceURL&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mCredentials&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;// Solve the service area and retrieve the result.&lt;BR /&gt;&lt;/SPAN&gt;ServiceAreaResult saResult = sat.solve(sap);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;return &lt;/SPAN&gt;saResult;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 20:29:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/drive-area/m-p/627194#M4224</guid>
      <dc:creator>AlexBlanco</dc:creator>
      <dc:date>2015-08-07T20:29:20Z</dc:date>
    </item>
  </channel>
</rss>

