<?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 Drag and drop sample - featureServices don't load? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-sample-featureservices-don-t-load/m-p/460955#M42620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the CSV drag and drop example &lt;A href="https://developers.arcgis.com/javascript/jssamples/exp_dragdrop.html" title="https://developers.arcgis.com/javascript/jssamples/exp_dragdrop.html"&gt;Drag and drop to display data | ArcGIS API for JavaScript&lt;/A&gt;&amp;nbsp; there is code that checks to see if you are dropping either a MapServer or FeatureServer.&amp;nbsp;&amp;nbsp; It works for map services, but when I try a FeatureServer, setting a breakpoint within the handleDrop function's 'else if' statement, I &lt;SPAN style="line-height: 1.5;"&gt;never&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt; see it execute:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (url.match(/(Map|Feature)Server\/\d+\/?$/i)) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ArcGIS Server Map/Feature Service Layer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handleFeatureLayer(url);&amp;nbsp;&amp;nbsp; //this never fires&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not all that familiar with the more shortcut method of Javascript, so I'm not sure how to interpret the if statement.&amp;nbsp;&amp;nbsp; Is this not supposed to work with FeatureServer and I'm just reading this wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Nov 2015 17:47:51 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2015-11-24T17:47:51Z</dc:date>
    <item>
      <title>Drag and drop sample - featureServices don't load?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-sample-featureservices-don-t-load/m-p/460955#M42620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the CSV drag and drop example &lt;A href="https://developers.arcgis.com/javascript/jssamples/exp_dragdrop.html" title="https://developers.arcgis.com/javascript/jssamples/exp_dragdrop.html"&gt;Drag and drop to display data | ArcGIS API for JavaScript&lt;/A&gt;&amp;nbsp; there is code that checks to see if you are dropping either a MapServer or FeatureServer.&amp;nbsp;&amp;nbsp; It works for map services, but when I try a FeatureServer, setting a breakpoint within the handleDrop function's 'else if' statement, I &lt;SPAN style="line-height: 1.5;"&gt;never&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt; see it execute:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (url.match(/(Map|Feature)Server\/\d+\/?$/i)) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ArcGIS Server Map/Feature Service Layer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handleFeatureLayer(url);&amp;nbsp;&amp;nbsp; //this never fires&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not all that familiar with the more shortcut method of Javascript, so I'm not sure how to interpret the if statement.&amp;nbsp;&amp;nbsp; Is this not supposed to work with FeatureServer and I'm just reading this wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 17:47:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-sample-featureservices-don-t-load/m-p/460955#M42620</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-11-24T17:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Drag and drop sample - featureServices don't load?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-sample-featureservices-don-t-load/m-p/460956#M42621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a &lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp"&gt;Regular Expression&lt;/A&gt; with its own type of syntax. There are some interpreters out there to decipher what that expression means. For example, this &lt;A href="https://regex101.com/"&gt;one &lt;/A&gt;​reports this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="first-folder"&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN class="expslash"&gt;/&lt;/SPAN&gt;&lt;SPAN class="treeview_pattern regex_colorizer"&gt;&lt;STRONG class="g1" data-groupnum="1" data-tooltip="506;false;undefined;i"&gt;(&lt;/STRONG&gt;Map&lt;STRONG class="g1" data-tooltip="12;false;12;i"&gt;|&lt;/STRONG&gt;Feature&lt;STRONG class="g1" data-groupnum="1" data-tooltip="506;false;undefined;i"&gt;)&lt;/STRONG&gt;Server&lt;STRONG class="et" data-tooltip="24;false;19;i"&gt;\/&lt;/STRONG&gt;&lt;STRONG data-tooltip="7;undefined;undefined;i"&gt;\d&lt;/STRONG&gt;&lt;STRONG data-tooltip="8;false;undefined;i"&gt;+&lt;/STRONG&gt;&lt;STRONG class="et" data-tooltip="24;false;19;i"&gt;\/&lt;/STRONG&gt;&lt;STRONG data-tooltip="8;false;undefined;i"&gt;?&lt;/STRONG&gt;&lt;STRONG data-tooltip="7;undefined;undefined;i"&gt;$&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="expslash"&gt;/&lt;/SPAN&gt;&lt;SPAN class="treeview_options treeview_pattern"&gt;i&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="folder"&gt;&lt;SPAN class="capturinggrooup match1"&gt;1st&lt;/SPAN&gt; Capturing group &lt;SPAN class="group"&gt;(Map|Feature)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="folder"&gt;&lt;SPAN class="alt_token"&gt;1st&lt;/SPAN&gt; Alternative: &lt;SPAN class="alternation"&gt;Map&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="file"&gt;&lt;SPAN class="token"&gt;Map&lt;/SPAN&gt; matches the characters &lt;SPAN class="literal"&gt;Map&lt;/SPAN&gt; literally (case insensitive)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="folder"&gt;&lt;SPAN class="alt_token"&gt;2nd&lt;/SPAN&gt; Alternative: &lt;SPAN class="alternation"&gt;Feature&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="file"&gt;&lt;SPAN class="token"&gt;Feature&lt;/SPAN&gt; matches the characters &lt;SPAN class="literal"&gt;Feature&lt;/SPAN&gt; literally (case insensitive)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="file"&gt;&lt;SPAN class="token"&gt;Server&lt;/SPAN&gt; matches the characters &lt;SPAN class="literal"&gt;Server&lt;/SPAN&gt; literally (case insensitive)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="file"&gt;&lt;SPAN class="token"&gt;\/&lt;/SPAN&gt; matches the character &lt;SPAN class="literal"&gt;/&lt;/SPAN&gt; literally&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="folder"&gt;&lt;SPAN class="token"&gt;\d+&lt;/SPAN&gt; match a digit &lt;SPAN class="treeCharclass"&gt;[0-9]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="file"&gt;&lt;SPAN class="note"&gt;Quantifier:&lt;/SPAN&gt; &lt;SPAN class="inner-quantifier"&gt;+&lt;/SPAN&gt; Between &lt;SPAN class="quantifier"&gt;one&lt;/SPAN&gt; and &lt;SPAN class="quantifier"&gt;unlimited&lt;/SPAN&gt; times, as many times as possible, giving back as needed &lt;SPAN class="misc"&gt;[greedy]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="folder"&gt;&lt;SPAN class="token"&gt;\/?&lt;/SPAN&gt; matches the character &lt;SPAN class="literal"&gt;/&lt;/SPAN&gt; literally&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="file"&gt;&lt;SPAN class="note"&gt;Quantifier:&lt;/SPAN&gt; &lt;SPAN class="inner-quantifier"&gt;?&lt;/SPAN&gt; Between &lt;SPAN class="quantifier"&gt;zero&lt;/SPAN&gt; and &lt;SPAN class="quantifier"&gt;one&lt;/SPAN&gt; time, as many times as possible, giving back as needed &lt;SPAN class="misc"&gt;[greedy]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="file"&gt;&lt;SPAN class="token"&gt;$&lt;/SPAN&gt; assert position at end of the string&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="file"&gt;&lt;SPAN class="modifier"&gt;i modifier:&lt;/SPAN&gt; &lt;STRONG&gt;i&lt;/STRONG&gt;nsensitive. Case insensitive match (ignores case of &lt;SPAN class="treeCharclass"&gt;[a-zA-Z]&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Unfortunately, I don't know why it doesn't return true with a valid layer in a FeatureService&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran this with this &lt;A href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0"&gt;FeatureService layer&lt;/A&gt; and it did hit that function, so that syntax is working properly. You have to make sure you specify the layer, not just the service.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Nov 2015 20:55:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/drag-and-drop-sample-featureservices-don-t-load/m-p/460956#M42621</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-11-24T20:55:43Z</dc:date>
    </item>
  </channel>
</rss>

