<?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 Access individual feature properties when running l.esri.find or l.esri.query in Open Source Mapping Libraries Ques.</title>
    <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/access-individual-feature-properties-when-running/m-p/1005739#M106</link>
    <description>&lt;P&gt;Hello:&lt;BR /&gt;&lt;BR /&gt;Here is what my site looks like: &lt;A href="https://brandonlprice.github.io/landrecords/" target="_blank" rel="noopener"&gt;https://brandonlprice.github.io/landrecords/&lt;/A&gt;. How can I access the feature properties for a layer when running a find or a query on a layer? I have the the feature.properties.length being displayed in a .innerhtml to show the total count of features returned. I also would like to be able to display the individual attributes for each feature in a layer in a .innerhtml when they are clicked on in the map. The onEachFeature would be one way although I do not know how to link that to the query.run or find.run. How can I do that? Are there any other way to access the individual attributes. My code snippets are below.&lt;/P&gt;
&lt;P&gt;Query:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function tmqueryFunction() {
	latlng = markerLayer.getLatLng();
	tmbufferResult.clearLayers();
	document.getElementById("tractcounts").innerHTML = '';
  if (document.getElementById("tm1").checked == true){
tmquery.nearby(latlng, distance);
tmquery.run(function (error, featureCollection, response) {
  if (error) {
    console.log(error);
    return;
  }
  tmbufferResult.addData(featureCollection).addTo(map)
  document.getElementById('tractcounts').innerHTML = 'Tract Map Records: ' + 
  featureCollection.features.length;	  
  });  
  map.fitBounds(L.geoJSON(featureCollection).getBounds());
});
}
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Find&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function recordgo() {
var find = L.esri.find({
  url: 'https://dpw.gis.lacounty.gov/dpw/rest/services/landrecords/MapServer/'
});
var recordnumber = document.getElementById("recordnumber").value;
	buffergroup.clearLayers();
	pmbufferResult.clearLayers();
	srbufferResult.clearLayers();
	tmbufferResult.clearLayers();
if (recordtype === "tract") {
    find.layers('2')
  .text(recordnumber)
  .contains(false)
  .fields('REFERENCE');

find.run(function (error, featureCollection, response) {
  if (error) {
    console.log(error);
    return;
  }
  tmbufferResult.addData(featureCollection).addTo(map);
  console.log('Found ' + featureCollection.features.length + ' feature(s)');
  document.getElementById('recordinfo').innerHTML = featureCollection.features[0].properties.REFERENCE + ', Record Date: ' + featureCollection.features[0].properties.RCRD_DATE;
  console.log(featureCollection.features[0].properties.REFERENCE + ', Record Date: ' + featureCollection.features[0].properties.RCRD_DATE);
  map.fitBounds(L.geoJSON(featureCollection).getBounds())
});
  }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 20:17:59 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2023-08-25T20:17:59Z</dc:date>
    <item>
      <title>Access individual feature properties when running l.esri.find or l.esri.query</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/access-individual-feature-properties-when-running/m-p/1005739#M106</link>
      <description>&lt;P&gt;Hello:&lt;BR /&gt;&lt;BR /&gt;Here is what my site looks like: &lt;A href="https://brandonlprice.github.io/landrecords/" target="_blank" rel="noopener"&gt;https://brandonlprice.github.io/landrecords/&lt;/A&gt;. How can I access the feature properties for a layer when running a find or a query on a layer? I have the the feature.properties.length being displayed in a .innerhtml to show the total count of features returned. I also would like to be able to display the individual attributes for each feature in a layer in a .innerhtml when they are clicked on in the map. The onEachFeature would be one way although I do not know how to link that to the query.run or find.run. How can I do that? Are there any other way to access the individual attributes. My code snippets are below.&lt;/P&gt;
&lt;P&gt;Query:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function tmqueryFunction() {
	latlng = markerLayer.getLatLng();
	tmbufferResult.clearLayers();
	document.getElementById("tractcounts").innerHTML = '';
  if (document.getElementById("tm1").checked == true){
tmquery.nearby(latlng, distance);
tmquery.run(function (error, featureCollection, response) {
  if (error) {
    console.log(error);
    return;
  }
  tmbufferResult.addData(featureCollection).addTo(map)
  document.getElementById('tractcounts').innerHTML = 'Tract Map Records: ' + 
  featureCollection.features.length;	  
  });  
  map.fitBounds(L.geoJSON(featureCollection).getBounds());
});
}
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Find&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function recordgo() {
var find = L.esri.find({
  url: 'https://dpw.gis.lacounty.gov/dpw/rest/services/landrecords/MapServer/'
});
var recordnumber = document.getElementById("recordnumber").value;
	buffergroup.clearLayers();
	pmbufferResult.clearLayers();
	srbufferResult.clearLayers();
	tmbufferResult.clearLayers();
if (recordtype === "tract") {
    find.layers('2')
  .text(recordnumber)
  .contains(false)
  .fields('REFERENCE');

find.run(function (error, featureCollection, response) {
  if (error) {
    console.log(error);
    return;
  }
  tmbufferResult.addData(featureCollection).addTo(map);
  console.log('Found ' + featureCollection.features.length + ' feature(s)');
  document.getElementById('recordinfo').innerHTML = featureCollection.features[0].properties.REFERENCE + ', Record Date: ' + featureCollection.features[0].properties.RCRD_DATE;
  console.log(featureCollection.features[0].properties.REFERENCE + ', Record Date: ' + featureCollection.features[0].properties.RCRD_DATE);
  map.fitBounds(L.geoJSON(featureCollection).getBounds())
});
  }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 20:17:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/access-individual-feature-properties-when-running/m-p/1005739#M106</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-08-25T20:17:59Z</dc:date>
    </item>
  </channel>
</rss>

