<?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 IdentifyParameters layerDefinitions property (API 4.12) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layerdefinitions-property-api-4/m-p/338741#M31349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was looking for a method to filter the Identify results and after digging into the obfuscated code of the API I found out that there are some properties in the IdentifyParameters which are not documented. One of them is the property "layerDefinitions" and that was exactly what I was looking for!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the Typescript definitions do not expose these properties and also the documentation do not mention them. I was wondering why these properties are not documented and in the definition file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My&amp;nbsp;workaround for now is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 15px;"&gt;const params = new IdentifyParameters();&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.width = this.view.width;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.height = this.view.height;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.mapExtent = this.view.extent;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.layerOption = 'visible';&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.geometry = geometry;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.tolerance = 3;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.returnGeometry = true;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.returnFieldName = true;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; // Undocumented property...&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; (params as any).layerDefinitions = myLayerDefinitions&amp;nbsp; // format: {layerId1: whereClause1, layerId2: whereClause2}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully the properties will soon be added to the definitions file and documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 16:21:29 GMT</pubDate>
    <dc:creator>FreddyBroring</dc:creator>
    <dc:date>2021-12-12T16:21:29Z</dc:date>
    <item>
      <title>IdentifyParameters layerDefinitions property (API 4.12)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layerdefinitions-property-api-4/m-p/338741#M31349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was looking for a method to filter the Identify results and after digging into the obfuscated code of the API I found out that there are some properties in the IdentifyParameters which are not documented. One of them is the property "layerDefinitions" and that was exactly what I was looking for!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the Typescript definitions do not expose these properties and also the documentation do not mention them. I was wondering why these properties are not documented and in the definition file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My&amp;nbsp;workaround for now is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-size: 15px;"&gt;const params = new IdentifyParameters();&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.width = this.view.width;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.height = this.view.height;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.mapExtent = this.view.extent;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.layerOption = 'visible';&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.geometry = geometry;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.tolerance = 3;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.returnGeometry = true;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; params.returnFieldName = true;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; // Undocumented property...&lt;/SPAN&gt;
&lt;SPAN style="font-size: 15px;"&gt; (params as any).layerDefinitions = myLayerDefinitions&amp;nbsp; // format: {layerId1: whereClause1, layerId2: whereClause2}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully the properties will soon be added to the definitions file and documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:21:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identifyparameters-layerdefinitions-property-api-4/m-p/338741#M31349</guid>
      <dc:creator>FreddyBroring</dc:creator>
      <dc:date>2021-12-12T16:21:29Z</dc:date>
    </item>
  </channel>
</rss>

