<?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: Is it possible to extract field Type information in onEachFeature? in Open Source Mapping Libraries Ques.</title>
    <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/is-it-possible-to-extract-field-type-information/m-p/874793#M536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did it thanks- don't know how I missed that...very much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2014 18:46:56 GMT</pubDate>
    <dc:creator>GreigMcArthur</dc:creator>
    <dc:date>2014-11-25T18:46:56Z</dc:date>
    <item>
      <title>Is it possible to extract field Type information in onEachFeature?</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/is-it-possible-to-extract-field-type-information/m-p/874791#M534</link>
      <description>&lt;P&gt;I'm currently using an older (6months+) version of esri-leaflet and previous I modified the onEachFeature function to be able to find the related L.esri.featureLayer for the layer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With this I could then access the field metadata through featureLayer.fields&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; &lt;BR /&gt;The reason was for simple type detection and formatting for display in popup - i.e. detect the esriFieldTypeOID field and ignore it, or detect a date field and format the output accordingly etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see an equivalent of the 'fields' array in the current FeatureLayer class - is there somewhere else I can get this metadata for a layer?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 13:50:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/is-it-possible-to-extract-field-type-information/m-p/874791#M534</guid>
      <dc:creator>GreigMcArthur</dc:creator>
      <dc:date>2023-08-28T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to extract field Type information in onEachFeature?</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/is-it-possible-to-extract-field-type-information/m-p/874792#M535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes each layer has a built in &lt;CODE&gt;layer.metadata()&lt;/CODE&gt; method to get the metadata for the layer. It accepts a callback function which will be executed with &lt;CODE&gt;error&lt;/CODE&gt; and &lt;CODE&gt;metadata&lt;/CODE&gt; which will contain your field information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esri.github.io/esri-leaflet/examples/getting-service-metadata.html" title="http://esri.github.io/esri-leaflet/examples/getting-service-metadata.html"&gt;Getting service metadata | Esri Leaflet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example the &lt;CODE&gt;metadata&lt;/CODE&gt; in the callback function should contain all your field information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 17:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/is-it-possible-to-extract-field-type-information/m-p/874792#M535</guid>
      <dc:creator>PatrickArlt1</dc:creator>
      <dc:date>2014-11-24T17:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to extract field Type information in onEachFeature?</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/is-it-possible-to-extract-field-type-information/m-p/874793#M536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did it thanks- don't know how I missed that...very much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 18:46:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/is-it-possible-to-extract-field-type-information/m-p/874793#M536</guid>
      <dc:creator>GreigMcArthur</dc:creator>
      <dc:date>2014-11-25T18:46:56Z</dc:date>
    </item>
  </channel>
</rss>

