<?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 Can I use an ArcGIS Online Feature Layer as the facility url for the AGOL ClosestFacility task? in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/can-i-use-an-arcgis-online-feature-layer-as-the/m-p/31446#M37</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am attempting to use the ArcGIS Online Closest Facility task:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A class="jive-link-external-small" href="http://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World/solveClosestFacility" rel="nofollow" target="_blank"&gt;http://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World/solveClosestFacility&lt;/A&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;With the following parameters for facilities and incidents:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;facilities&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;{"url":"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://services.arcgis.com/RmCCgQtiZLDCtblq/arcgis/rest/services/Fire_Stations/FeatureServer/0/query?where=city%3D%27los+angeles%27&amp;amp;outFields%3DName&amp;amp;returnGeometry%3Dtrue&amp;amp;outSR%3D102100%3DVtjSraa8y5XG-YRCUntAQMIEJv2lA-BP3cVJPgT2yOLiz0fo1ZrEwZUM6MJIXJxvfBj7bi0sBfpcvz6zkAMO2R3U0X66YYr7iUGUMts60A1WTByO5xE9iRN1kb_lY5700InCiUNS7RfIaniPxRYulqNU2j6HCt8P4xthDuVpMu5raCkTbYiDxNNtCmSuYpc652MZ_ejIJp0JFx7evO7XjA..&amp;amp;f%3Djson" rel="nofollow" target="_blank"&gt;http://services.arcgis.com/RmCCgQtiZLDCtblq/arcgis/rest/services/Fire_Stations/FeatureServer/0/query?where=city%3D%27los+angeles%27&amp;amp;outFields%3DName&amp;amp;returnGeometry%3Dtrue&amp;amp;outSR%3D102100%3DVtjSraa8y5XG-YRCUntAQMIEJv2lA-BP3cVJPgT2yOLiz0fo1ZrEwZUM6MJIXJxvfBj7bi0sBfpcvz6zkAMO2R3U0X66YYr7iUGUMts60A1WTByO5xE9iRN1kb_lY5700InCiUNS7RfIaniPxRYulqNU2j6HCt8P4xthDuVpMu5raCkTbYiDxNNtCmSuYpc652MZ_ejIJp0JFx7evO7XjA..&amp;amp;f%3Djson&lt;/A&gt;&lt;SPAN&gt;","doNotLocateOnRestrictedElements":"false"}&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;incidents&lt;/TD&gt;&lt;TD&gt;{"features":[{"geometry":{"x":-13172928.229559887,"y":4038931.0269312863,"spatialReference":{"wkid":102100}}}]}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously the token in the above facilities url is now expired, however at the time of execution, I can copy the full url into a browser and I get back a feature set with 65 features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately when I execute the ClosestFacility task, I get the response:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 location(s) in "Facilities" are valid.&amp;nbsp; Need at least 1 valid location(s).&amp;nbsp; Insufficient number of valid locations in "Facilities" or "Incidents".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody successfully used the url to an ArcGIS Online Feature Layer as the source of the facilities parameter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know why this might be failing?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jon Swoveland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Oct 2014 21:54:37 GMT</pubDate>
    <dc:creator>JonSwoveland1</dc:creator>
    <dc:date>2014-10-16T21:54:37Z</dc:date>
    <item>
      <title>Can I use an ArcGIS Online Feature Layer as the facility url for the AGOL ClosestFacility task?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/can-i-use-an-arcgis-online-feature-layer-as-the/m-p/31446#M37</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am attempting to use the ArcGIS Online Closest Facility task:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A class="jive-link-external-small" href="http://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World/solveClosestFacility" rel="nofollow" target="_blank"&gt;http://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World/solveClosestFacility&lt;/A&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;With the following parameters for facilities and incidents:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;facilities&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;{"url":"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://services.arcgis.com/RmCCgQtiZLDCtblq/arcgis/rest/services/Fire_Stations/FeatureServer/0/query?where=city%3D%27los+angeles%27&amp;amp;outFields%3DName&amp;amp;returnGeometry%3Dtrue&amp;amp;outSR%3D102100%3DVtjSraa8y5XG-YRCUntAQMIEJv2lA-BP3cVJPgT2yOLiz0fo1ZrEwZUM6MJIXJxvfBj7bi0sBfpcvz6zkAMO2R3U0X66YYr7iUGUMts60A1WTByO5xE9iRN1kb_lY5700InCiUNS7RfIaniPxRYulqNU2j6HCt8P4xthDuVpMu5raCkTbYiDxNNtCmSuYpc652MZ_ejIJp0JFx7evO7XjA..&amp;amp;f%3Djson" rel="nofollow" target="_blank"&gt;http://services.arcgis.com/RmCCgQtiZLDCtblq/arcgis/rest/services/Fire_Stations/FeatureServer/0/query?where=city%3D%27los+angeles%27&amp;amp;outFields%3DName&amp;amp;returnGeometry%3Dtrue&amp;amp;outSR%3D102100%3DVtjSraa8y5XG-YRCUntAQMIEJv2lA-BP3cVJPgT2yOLiz0fo1ZrEwZUM6MJIXJxvfBj7bi0sBfpcvz6zkAMO2R3U0X66YYr7iUGUMts60A1WTByO5xE9iRN1kb_lY5700InCiUNS7RfIaniPxRYulqNU2j6HCt8P4xthDuVpMu5raCkTbYiDxNNtCmSuYpc652MZ_ejIJp0JFx7evO7XjA..&amp;amp;f%3Djson&lt;/A&gt;&lt;SPAN&gt;","doNotLocateOnRestrictedElements":"false"}&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;incidents&lt;/TD&gt;&lt;TD&gt;{"features":[{"geometry":{"x":-13172928.229559887,"y":4038931.0269312863,"spatialReference":{"wkid":102100}}}]}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously the token in the above facilities url is now expired, however at the time of execution, I can copy the full url into a browser and I get back a feature set with 65 features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately when I execute the ClosestFacility task, I get the response:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 location(s) in "Facilities" are valid.&amp;nbsp; Need at least 1 valid location(s).&amp;nbsp; Insufficient number of valid locations in "Facilities" or "Incidents".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody successfully used the url to an ArcGIS Online Feature Layer as the source of the facilities parameter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know why this might be failing?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jon Swoveland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 21:54:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/can-i-use-an-arcgis-online-feature-layer-as-the/m-p/31446#M37</guid>
      <dc:creator>JonSwoveland1</dc:creator>
      <dc:date>2014-10-16T21:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use an ArcGIS Online Feature Layer as the facility url for the AGOL ClosestFacility task?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/can-i-use-an-arcgis-online-feature-layer-as-the/m-p/31447#M38</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nevermind, I figured it out.&lt;/P&gt;&lt;P&gt;I was escaping the '=' characters in the query string.&amp;nbsp; Fiddler was un-escaping these, so when I copied the url it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 22:08:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/can-i-use-an-arcgis-online-feature-layer-as-the/m-p/31447#M38</guid>
      <dc:creator>JonSwoveland1</dc:creator>
      <dc:date>2014-10-16T22:08:49Z</dc:date>
    </item>
  </channel>
</rss>

