<?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>idea Expose styles on WMSSublayer in ArcGIS JavaScript Maps SDK Ideas</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/expose-styles-on-wmssublayer/idi-p/1493575</link>
    <description>&lt;P&gt;Expose styles for WMS sublayers on the WMSSublayer class as property.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const layer = new WMSLayer({ url: "..." });
const sublayer = layer.sublayers.at(0);

const styles = sublayer.styles; // access styles&lt;/LI-CODE&gt;&lt;P&gt;Currently it's impossible to access styles of WMS sublayers through WMSSublayer class.&lt;/P&gt;&lt;P&gt;Using different styles provided by a WMS layer, requires hacky workarounds like monkey patching WMS layer class, which involves relying on internal, undocumented interfaces. Other workarounds may be an additional GetCapabilities requests or writing some fancy request interceptors. All those attempts do not scale.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Having direct access to styles on the WMSSublayer class, would allow applications to leverage different styles&amp;nbsp; for differen sublayers provided by a WMS layer using the &lt;STRONG&gt;customLayerParameters&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Thinking ahead, the WMSSublayer class might provide a direct interface to set a style, so applications would not have to rely on &lt;STRONG&gt;customLayerParameters &lt;/STRONG&gt;from the WMSLayer class:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sublayer.style = 'default'; // sets the default style
sublayer.style = sublayer.styles[1]; // sets the first style from the styles list&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Setting the style on a sublayer, would than trigger a new GetMap-Request.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2024 07:04:06 GMT</pubDate>
    <dc:creator>SebastianFrey1</dc:creator>
    <dc:date>2024-06-17T07:04:06Z</dc:date>
    <item>
      <title>Expose styles on WMSSublayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/expose-styles-on-wmssublayer/idi-p/1493575</link>
      <description>&lt;P&gt;Expose styles for WMS sublayers on the WMSSublayer class as property.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const layer = new WMSLayer({ url: "..." });
const sublayer = layer.sublayers.at(0);

const styles = sublayer.styles; // access styles&lt;/LI-CODE&gt;&lt;P&gt;Currently it's impossible to access styles of WMS sublayers through WMSSublayer class.&lt;/P&gt;&lt;P&gt;Using different styles provided by a WMS layer, requires hacky workarounds like monkey patching WMS layer class, which involves relying on internal, undocumented interfaces. Other workarounds may be an additional GetCapabilities requests or writing some fancy request interceptors. All those attempts do not scale.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Having direct access to styles on the WMSSublayer class, would allow applications to leverage different styles&amp;nbsp; for differen sublayers provided by a WMS layer using the &lt;STRONG&gt;customLayerParameters&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Thinking ahead, the WMSSublayer class might provide a direct interface to set a style, so applications would not have to rely on &lt;STRONG&gt;customLayerParameters &lt;/STRONG&gt;from the WMSLayer class:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sublayer.style = 'default'; // sets the default style
sublayer.style = sublayer.styles[1]; // sets the first style from the styles list&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Setting the style on a sublayer, would than trigger a new GetMap-Request.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 07:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/expose-styles-on-wmssublayer/idi-p/1493575</guid>
      <dc:creator>SebastianFrey1</dc:creator>
      <dc:date>2024-06-17T07:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Expose styles on WMSSublayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/expose-styles-on-wmssublayer/idc-p/1594661#M388</link>
      <description>&lt;P&gt;This has been logged as an enhancement request with the product team, who are currently reviewing it.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 10:48:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/expose-styles-on-wmssublayer/idc-p/1594661#M388</guid>
      <dc:creator>PeterHodkinson</dc:creator>
      <dc:date>2025-03-12T10:48:08Z</dc:date>
    </item>
  </channel>
</rss>

