<?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 Closest Facility using featureService for Facilities in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/closest-facility-using-featureservice-for/m-p/290884#M26736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Has anyone successfully accomplished this? The example uses pre-defined graphic points hard-coded but I need to draw the facilities from a published feature service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rGibson&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*UPDATE* Solved myself....see below should anyone else need the info. Simple actually....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;facilitiesFeatureLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://yourURL/arcgis/rest/services/yourService/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://yourURL/arcgis/rest/services/yourService/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode: FeatureLayer.MODE_SNAPSHOT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(facilitiesFeatureLayer);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var facilities = new FeatureSet();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;facilities.features = facilitiesFeatureLayer.graphics;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;params.facilities = facilities;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Aug 2013 13:58:54 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2013-08-19T13:58:54Z</dc:date>
    <item>
      <title>Closest Facility using featureService for Facilities</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/closest-facility-using-featureservice-for/m-p/290884#M26736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Has anyone successfully accomplished this? The example uses pre-defined graphic points hard-coded but I need to draw the facilities from a published feature service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rGibson&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*UPDATE* Solved myself....see below should anyone else need the info. Simple actually....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;facilitiesFeatureLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://yourURL/arcgis/rest/services/yourService/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://yourURL/arcgis/rest/services/yourService/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode: FeatureLayer.MODE_SNAPSHOT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(facilitiesFeatureLayer);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var facilities = new FeatureSet();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;facilities.features = facilitiesFeatureLayer.graphics;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;params.facilities = facilities;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 13:58:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/closest-facility-using-featureservice-for/m-p/290884#M26736</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-08-19T13:58:54Z</dc:date>
    </item>
  </channel>
</rss>

