<?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 Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440845#M11427</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How exactly do you set the visibility of WMS sub layer using Wms.Layers property?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 14:54:54 GMT</pubDate>
    <dc:creator>johnbrosowsky</dc:creator>
    <dc:date>2015-03-18T14:54:54Z</dc:date>
    <item>
      <title>How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440843#M11425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Esri Toolkit datasource wms layer to add to the Map. But, in order to get/set the visibility of its sublayer it takes Layerid as an argument which is not public. The question here is how can I use this method unless I have the Layerid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SetLayerVisibility(int layerID, bool visible);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Same is the issue with MaximumScale and MinimumScale. Please suggest me a proper way to handle this situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rergards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rouf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 13:06:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440843#M11425</guid>
      <dc:creator>roufbaba</dc:creator>
      <dc:date>2012-03-27T13:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440844#M11426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;But, in order to get/set the visibility of its sublayer it takes Layerid as an argument which is not public. The question here is how can I use this method unless I have the Layerid.&lt;BR /&gt;&lt;BR /&gt;SetLayerVisibility(int layerID, bool visible);&lt;BR /&gt;&lt;BR /&gt;Same is the issue with MaximumScale and MinimumScale. Please suggest me a proper way to handle this situation.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SetLayerVisibility is mainly there to deal with the legend control, it allows to easily set the layer visibilities from the legend (&lt;/SPAN&gt;&lt;A href="http://resourcesbeta.arcgis.com/en/webapis/silverlight-api/samples/start.htm#LegendKmlWms"&gt;sample&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To set the visibility from public name you should use the Wms.Layers property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Concerning the MaximumScale and MinimumScale, this can be set at layer level by setting the Layer MinimumResolution and/or MaximumResolution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But that can't be changed for sublayers. The min/max scale of sublayers are defined by the wms service itself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 15:18:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440844#M11426</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-03-27T15:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440845#M11427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How exactly do you set the visibility of WMS sub layer using Wms.Layers property?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 14:54:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440845#M11427</guid>
      <dc:creator>johnbrosowsky</dc:creator>
      <dc:date>2015-03-18T14:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440846#M11428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 'Layers' property is of type string[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can set it in XAML though a comma separated layer list:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp; &amp;lt;esri:WmsLayer Layers="layer1,layer2" .....&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or in C# by code like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;wmsLayer.Layers = new[] { "layer1", "layer2"};&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to know dynamically the list of layers supported by the service you can use the &lt;A href="https://developers.arcgis.com/silverlight/api-reference/ESRI.ArcGIS.Client.Toolkit.DataSources~ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer~LayerList.html"&gt;LayerList&lt;/A&gt; property&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 15:09:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440846#M11428</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2015-03-18T15:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440847#M11429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dominique - I can add the WMS successfully, using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;esri:WmsLayer Layers="layer1,layer2"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. but default visibility on the WMS sub layers is false. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I programmatically turn on visibility for a WMS sub layer in c#? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 15:32:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440847#M11429</guid>
      <dc:creator>johnbrosowsky</dc:creator>
      <dc:date>2015-03-18T15:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440848#M11430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Visibility of WMS layers should be depending on the list of Layers you set.&lt;/P&gt;&lt;P&gt;From the moment you set Layers to "layer1, layer2", these sublayers should be visible (and all ascendants and descendants as well if you are working with a hierarchy of sublayers).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to observe that by setting up a legend control that displays the sub layers visibility such as in this &lt;A href="https://developers.arcgis.com/silverlight/sample-code/start.htm#LegendKmlWms"&gt;sample&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In synthesis:&lt;/P&gt;&lt;P&gt;- to change programmatically the layer visibilities --&amp;gt; set the 'Layers' property&lt;/P&gt;&lt;P&gt;- to change interactively these visibilities --&amp;gt; use the legend control&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 16:21:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440848#M11430</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2015-03-18T16:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440849#M11431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok got it.&amp;nbsp; I was providing wrong layer name.&amp;nbsp; What was confusing was even if I put gibberish in there, the WMS sub layers appear properly in the TOC with visibility off.&amp;nbsp; When I provide correct layer name, it appears in the map, and the TOC with visibility on, so good news.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I have a new WMS visibility problem.&amp;nbsp; The WMS extent covers a US state.&amp;nbsp; When I pan the map so that state is no longer in view, then I get a blank map with text at upper right that says "no data for requested layers".&amp;nbsp; Any ideas for how to work around that?&amp;nbsp; This is a google maps engine WMS.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 16:28:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440849#M11431</guid>
      <dc:creator>johnbrosowsky</dc:creator>
      <dc:date>2015-03-18T16:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440850#M11432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;This is a google maps engine WMS.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;My best suggestion --&amp;gt; Use ArcGIS Server &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else you can try to set the full extent of the WmsLayer (by using the SetFullExtent method) with the envelope of the state covered. This should prevent from sending image requests to the server when the state is not in the view (not tested though)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 17:12:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440850#M11432</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2015-03-18T17:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide layerid to  Toolkit WMSLayer SetLayerVisibility method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440851#M11433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; ... unfortunately this does not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;WMSlayer.SetFullExtent (New ESRI.ArcGIS.Client.Geometry.Envelope(-14014336.9175627, 2078853.04659498, -8279569.89247312, 5078853.64659498))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;... but is that the correct way to set full extent for a wms layer?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 22:20:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-provide-layerid-to-nbsp-toolkit-wmslayer/m-p/440851#M11433</guid>
      <dc:creator>johnbrosowsky</dc:creator>
      <dc:date>2015-03-20T22:20:12Z</dc:date>
    </item>
  </channel>
</rss>

