<?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 Can we Load Versioned Feature layer passing version name in URL Params in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-we-load-versioned-feature-layer-passing/m-p/1180304#M77608</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As per our current requirement we need to load branch version data in web app where we will pass version name in the url params. could anybody please give some idea how to achieve this using javascript api.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 17:09:44 GMT</pubDate>
    <dc:creator>naveenbesri</dc:creator>
    <dc:date>2022-06-06T17:09:44Z</dc:date>
    <item>
      <title>Can we Load Versioned Feature layer passing version name in URL Params</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-we-load-versioned-feature-layer-passing/m-p/1180304#M77608</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As per our current requirement we need to load branch version data in web app where we will pass version name in the url params. could anybody please give some idea how to achieve this using javascript api.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 17:09:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-we-load-versioned-feature-layer-passing/m-p/1180304#M77608</guid>
      <dc:creator>naveenbesri</dc:creator>
      <dc:date>2022-06-06T17:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can we Load Versioned Feature layer passing version name in URL Params</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-we-load-versioned-feature-layer-passing/m-p/1180413#M77611</link>
      <description>&lt;P&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html" target="_self"&gt;MapImageLayer&lt;/A&gt; class has a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#gdbVersion" target="_self"&gt;gdbVersion&lt;/A&gt; property that allows you to specify the version for the layer (&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html" target="_self"&gt;FeatureLayer&lt;/A&gt; does too).&amp;nbsp; Therefore, you would get the version name from the URL, and add it into the constructor for the layer.&amp;nbsp; For example (assuming the name of the version parameter in your URL is "version"):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var myLayer = new MapImageLayer({
	url: "https://myserver/arcgis/rest/services/MyService/MapServer",
	gdbVersion: new URLSearchParams(window.location.search).get("version")
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 20:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-we-load-versioned-feature-layer-passing/m-p/1180413#M77611</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2022-06-06T20:23:46Z</dc:date>
    </item>
  </channel>
</rss>

