<?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 Pass custom parameters along with require construct in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pass-custom-parameters-along-with-require/m-p/1517632#M85280</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; This is just a requirejs question rather than specific to arcgis sdk. I need to pass custom parameters to my query function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my query function, I am not able to pass more parameters in the require construct. I am using function as a part of a bigger js file that will contain other map functions. I need to pass canal and lateral while calling that function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below errors out. If I remove canal and lateral and just add it to the function definition they are always undefined.&lt;/P&gt;&lt;P&gt;let queryFeature = (canal,lateral) =&amp;gt; {&lt;BR /&gt;require([&lt;BR /&gt;"esri/config",&lt;BR /&gt;"esri/WebMap",&lt;BR /&gt;"esri/views/MapView",&lt;BR /&gt;"esri/layers/FeatureLayer", canal,lateral&lt;BR /&gt;], function (esriConfig, WebMap, MapView, FeatureLayer,canal,lateral) {&lt;BR /&gt;//query features layer, which is the layer with gates. Feature # or URL needs to be stored in the config&lt;BR /&gt;console.log(canal);&lt;BR /&gt;console.log(lateral);&lt;BR /&gt;});&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or guyidance is appreciated. Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2024 18:20:04 GMT</pubDate>
    <dc:creator>RakeshAjwani</dc:creator>
    <dc:date>2024-08-09T18:20:04Z</dc:date>
    <item>
      <title>Pass custom parameters along with require construct</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pass-custom-parameters-along-with-require/m-p/1517632#M85280</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; This is just a requirejs question rather than specific to arcgis sdk. I need to pass custom parameters to my query function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my query function, I am not able to pass more parameters in the require construct. I am using function as a part of a bigger js file that will contain other map functions. I need to pass canal and lateral while calling that function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below errors out. If I remove canal and lateral and just add it to the function definition they are always undefined.&lt;/P&gt;&lt;P&gt;let queryFeature = (canal,lateral) =&amp;gt; {&lt;BR /&gt;require([&lt;BR /&gt;"esri/config",&lt;BR /&gt;"esri/WebMap",&lt;BR /&gt;"esri/views/MapView",&lt;BR /&gt;"esri/layers/FeatureLayer", canal,lateral&lt;BR /&gt;], function (esriConfig, WebMap, MapView, FeatureLayer,canal,lateral) {&lt;BR /&gt;//query features layer, which is the layer with gates. Feature # or URL needs to be stored in the config&lt;BR /&gt;console.log(canal);&lt;BR /&gt;console.log(lateral);&lt;BR /&gt;});&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or guyidance is appreciated. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 18:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pass-custom-parameters-along-with-require/m-p/1517632#M85280</guid>
      <dc:creator>RakeshAjwani</dc:creator>
      <dc:date>2024-08-09T18:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pass custom parameters along with require construct</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pass-custom-parameters-along-with-require/m-p/1517636#M85281</link>
      <description>&lt;P&gt;Nevermind, I figured it out. It needs to be like below. I needed to remove it from the require section.&lt;/P&gt;&lt;P&gt;let queryFeature = (canal,lateral) =&amp;gt; {&lt;BR /&gt;require([&lt;BR /&gt;"esri/config",&lt;BR /&gt;"esri/WebMap",&lt;BR /&gt;"esri/views/MapView",&lt;BR /&gt;"esri/layers/FeatureLayer",&lt;BR /&gt;], function (esriConfig, WebMap, MapView, FeatureLayer) {&lt;BR /&gt;//query features layer, which is the layer with gates. Feature # or URL needs to be stored in the config&lt;BR /&gt;console.log(canal);&lt;BR /&gt;console.log(lateral);&lt;BR /&gt;});&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 18:23:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pass-custom-parameters-along-with-require/m-p/1517636#M85281</guid>
      <dc:creator>RakeshAjwani</dc:creator>
      <dc:date>2024-08-09T18:23:58Z</dc:date>
    </item>
  </channel>
</rss>

