AnsweredAssumed Answered

Is it possible to extract field Type information in onEachFeature?

Question asked by greigm on Nov 16, 2014
Latest reply on Nov 25, 2014 by greigm

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. 


With this I could then access the field metadata through featureLayer.fields

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.


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?