<?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 Query FeatureLayer within a tiledMapLayer (ESRI Leaflet) in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/query-featurelayer-within-a-tiledmaplayer-esri/m-p/1273473#M6542</link>
    <description>&lt;P&gt;I have a feature layer of points and a tiledLayer of roads and municipality polygons. I want to query the points against the municipality polygons and return the ID's of the points within a specified municipality.&lt;/P&gt;&lt;P&gt;I already have a function that zooms to a municipality:&lt;/P&gt;&lt;PRE&gt;var zoomToMuni = function zoomToMuni(selectedMuni) {
  // where clause
  var whereClause = "MUNI = '".concat(selectedMuni, "'");
  
  var query = L.esri.query({
    url: 'https://services1.arcgis.com/MuniBoundariesService'
  });
  query.where(whereClause).bounds(function (error, latLngBounds, response) {
    if (error) {
      // add message to console
      console.warn('An error with the query request has occured');
      console.warn("Code: ".concat(error.code, "; Message: ").concat(error.message)); // set content of results element
    } else if (response.features &amp;lt; 1) {
      // add message to console
      console.log('No features selected'); // set content of results element
    } else {
      map.fitBounds(latLngBounds);
    }
  });&lt;/PRE&gt;&lt;P&gt;Ideally I would query the points in a way like "Points&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WITHIN&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SELECTEDMUNI", and then get the ID's returned by this and set a whereClause on the points that include these ID's.&lt;/P&gt;&lt;P&gt;I'm not sure this is possible with the examples I am seeing or the fact that the municipality polygons are a tiledLayer.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2023 12:28:27 GMT</pubDate>
    <dc:creator>MulfordnSons</dc:creator>
    <dc:date>2023-03-30T12:28:27Z</dc:date>
    <item>
      <title>Query FeatureLayer within a tiledMapLayer (ESRI Leaflet)</title>
      <link>https://community.esri.com/t5/developers-questions/query-featurelayer-within-a-tiledmaplayer-esri/m-p/1273473#M6542</link>
      <description>&lt;P&gt;I have a feature layer of points and a tiledLayer of roads and municipality polygons. I want to query the points against the municipality polygons and return the ID's of the points within a specified municipality.&lt;/P&gt;&lt;P&gt;I already have a function that zooms to a municipality:&lt;/P&gt;&lt;PRE&gt;var zoomToMuni = function zoomToMuni(selectedMuni) {
  // where clause
  var whereClause = "MUNI = '".concat(selectedMuni, "'");
  
  var query = L.esri.query({
    url: 'https://services1.arcgis.com/MuniBoundariesService'
  });
  query.where(whereClause).bounds(function (error, latLngBounds, response) {
    if (error) {
      // add message to console
      console.warn('An error with the query request has occured');
      console.warn("Code: ".concat(error.code, "; Message: ").concat(error.message)); // set content of results element
    } else if (response.features &amp;lt; 1) {
      // add message to console
      console.log('No features selected'); // set content of results element
    } else {
      map.fitBounds(latLngBounds);
    }
  });&lt;/PRE&gt;&lt;P&gt;Ideally I would query the points in a way like "Points&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WITHIN&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SELECTEDMUNI", and then get the ID's returned by this and set a whereClause on the points that include these ID's.&lt;/P&gt;&lt;P&gt;I'm not sure this is possible with the examples I am seeing or the fact that the municipality polygons are a tiledLayer.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 12:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/query-featurelayer-within-a-tiledmaplayer-esri/m-p/1273473#M6542</guid>
      <dc:creator>MulfordnSons</dc:creator>
      <dc:date>2023-03-30T12:28:27Z</dc:date>
    </item>
  </channel>
</rss>

