<?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 Re: Trying simple JS code to pull in a CSV ; works in sandbox, not outside  in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-simple-js-code-to-pull-in-a-csv-works-in/m-p/27838#M2383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a proxy on your server? Take a look at this &lt;A href="https://developers.arcgis.com/javascript/jshelp/ags_proxy.html"&gt;page&lt;/A&gt; for more information about them. Esri has create different proxies that you can set up on your server: &lt;A href="https://github.com/Esri/resource-proxy" title="https://github.com/Esri/resource-proxy"&gt;GitHub - Esri/resource-proxy: Proxy files for DotNet, Java and PHP.&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Feb 2016 21:43:04 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2016-02-22T21:43:04Z</dc:date>
    <item>
      <title>Trying simple JS code to pull in a CSV ; works in sandbox, not outside</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-simple-js-code-to-pull-in-a-csv-works-in/m-p/27837#M2382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still a newbie here- trying simple JS code to pull in a CSV.&amp;nbsp; It works in the sandbox but neither on my local server or pulled from a company web server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F" rel="nofollow" target="_blank"&gt;https://&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; developers.arcgis.com/javascript/jssamples/layers_csv.html&amp;nbsp; I get:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;n {message: "Unable to load /proxy/?&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fearthquake.usgs.gov%2F%E2%80%A6quakes%2Ffeed%2Fv1.0%2Fsummary%2F2.5_week.csv" rel="nofollow" target="_blank"&gt;http://earthquake.usgs.gov/…quakes/feed/v1.0/summary/2.5_week.csv&lt;/A&gt;&lt;SPAN&gt; status: 404", response: Object, status: 404, responseText: "&amp;lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&amp;gt;…was not found on this server.&amp;lt;/p&amp;gt;↵&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;↵", xhr: XMLHttpRequest…}_ssl: undefinedlog: undefinedmessage: "Unable to draw graphic (null): Unable to load /proxy/?&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fearthquake.usgs.gov%2Fearthquakes%2Ffeed%2Fv1.0%2Fsummary%2F2.5_week.csv" rel="nofollow" target="_blank"&gt;http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.csv&lt;/A&gt;&lt;SPAN&gt; status: 404"response: ObjectresponseText: "&amp;lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&amp;gt;↵&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;↵&amp;lt;title&amp;gt;404 Not Found&amp;lt;/title&amp;gt;↵&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;↵&amp;lt;h1&amp;gt;Not Found&amp;lt;/h1&amp;gt;↵&amp;lt;p&amp;gt;The requested URL /proxy/ was not found on this server.&amp;lt;/p&amp;gt;↵&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;↵"stack: (...)get stack: get stack()set &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2016 21:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-simple-js-code-to-pull-in-a-csv-works-in/m-p/27837#M2382</guid>
      <dc:creator>artHeyman</dc:creator>
      <dc:date>2016-02-22T21:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trying simple JS code to pull in a CSV ; works in sandbox, not outside</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-simple-js-code-to-pull-in-a-csv-works-in/m-p/27838#M2383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a proxy on your server? Take a look at this &lt;A href="https://developers.arcgis.com/javascript/jshelp/ags_proxy.html"&gt;page&lt;/A&gt; for more information about them. Esri has create different proxies that you can set up on your server: &lt;A href="https://github.com/Esri/resource-proxy" title="https://github.com/Esri/resource-proxy"&gt;GitHub - Esri/resource-proxy: Proxy files for DotNet, Java and PHP.&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2016 21:43:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-simple-js-code-to-pull-in-a-csv-works-in/m-p/27838#M2383</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2016-02-22T21:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Trying simple JS code to pull in a CSV ; works in sandbox, not outside</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-simple-js-code-to-pull-in-a-csv-works-in/m-p/27839#M2384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is you need to add a proxy in order to load csvfile that not coming from your local server domain. If you check this API document: &lt;A href="https://developers.arcgis.com/javascript/jsapi/csvlayer-amd.html" title="https://developers.arcgis.com/javascript/jsapi/csvlayer-amd.html"&gt;CSVLayer | API Reference | ArcGIS API for JavaScript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It said that "&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px;"&gt;If CSV files are not on the same domain as your website, a CORS enabled server or a proxy is required. "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore you need to implement a proxy in your local server and in the code point to the proxy.ashx file.&lt;/P&gt;&lt;P&gt;For example, instead in the sandbox&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1456178181359239" data-renderedposition="216_8_872_16" jivemacro_uid="_1456178181359239"&gt;&lt;P&gt;&lt;SPAN&gt;esriConfig.defaults.io.proxyUrl = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fserverapi.arcgisonline.com%2Fproxy%2Fproxy.ashx" rel="nofollow" target="_blank"&gt;http://serverapi.arcgisonline.com/proxy/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;You should point to your local server proxy url:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14561782684285863 jive_macro_code jive_text_macro" data-renderedposition="258_8_872_16" jivemacro_uid="_14561782684285863"&gt;&lt;P&gt;&lt;SPAN&gt;esriConfig.defaults.io.proxyUrl = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fyourlocaldomain.com%2FyourProxyFolderName%2Fproxy.ashx" rel="nofollow" target="_blank"&gt;http://yourlocaldomain.com/yourProxyFolderName/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can download the Esri resource proxy from here: &lt;A href="https://github.com/Esri/resource-proxy" title="https://github.com/Esri/resource-proxy"&gt;GitHub - Esri/resource-proxy: Proxy files for DotNet, Java and PHP.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more detail about how to setup proxy, you can follow this Esri blog: &lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.esri.com/esri/supportcenter/2015/04/07/setting-up-a-proxy/" title="https://blogs.esri.com/esri/supportcenter/2015/04/07/setting-up-a-proxy/"&gt;Setting up a Proxy | Support Services Blog&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this can help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2016 21:59:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trying-simple-js-code-to-pull-in-a-csv-works-in/m-p/27839#M2384</guid>
      <dc:creator>YueWu1</dc:creator>
      <dc:date>2016-02-22T21:59:45Z</dc:date>
    </item>
  </channel>
</rss>

