<?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 set layer visibility in arcgis API for WPF? in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181145#M797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure.&lt;/P&gt;&lt;P&gt;In a few words, its' an enhanced&amp;nbsp; version of the GraphicsLayer that enables displaying (and possibly editing) features from an ArcGIS Server REST service.&lt;/P&gt;&lt;P&gt;But better to point to the &lt;A href="http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer.html"&gt;FeatureLayer &lt;/A&gt;documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a FeatureLayer in Snapshot mode is 'almost' equivalent to a GraphicsLayers populated by yourself by the result of a query task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Oct 2014 19:33:55 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2014-10-30T19:33:55Z</dc:date>
    <item>
      <title>How to set layer visibility in arcgis API for WPF?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181139#M791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gurus!&lt;/P&gt;&lt;P&gt;I have next xaml:&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14146775577874648" jivemacro_uid="_14146775577874648" modifiedtitle="true"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Map x:Name="Map" &amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISDynamicMapServiceLayer ID="BaseLayer" &lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer" rel="nofollow" target="_blank"&gt;http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer&lt;/A&gt;&lt;SPAN&gt;" /&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Map&amp;gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;On the Map I have some point layer, which is not visible at start program. Two questions.&lt;/P&gt;&lt;P&gt;1. How I&amp;nbsp; can&amp;nbsp; set it visible in code behind? This code not help: &lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14146778483342171 jive_text_macro" jivemacro_uid="_14146778483342171"&gt;
&lt;P&gt;Map.Layers[0].Visible = true;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;2, In FindTask_ExecuteCompleted I get feature which I want set selected. How I can do this? This code does not work:&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14146780650999468 jive_text_macro" jivemacro_uid="_14146780650999468" modifiedtitle="true"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (FindResult result in args.FindResults)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result.Feature.Selected = true;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;3. How I can refresh Map layers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 14:11:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181139#M791</guid>
      <dc:creator>AnatoliiTerentiev</dc:creator>
      <dc:date>2014-10-30T14:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layer visibility in arcgis API for WPF?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181140#M792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are next layers in map service:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;Layers:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="http://terentievai:6080/arcgis/rest/services/streetRK/MapServer/0"&gt;km1&lt;/A&gt; (0)&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://terentievai:6080/arcgis/rest/services/streetRK/MapServer/1"&gt;routes_osm&lt;/A&gt; (1)&lt;/LI&gt;&lt;/UL&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14146809957123491" jivemacro_uid="_14146809957123491" modifiedtitle="true"&gt;
&lt;P&gt;So I think I need somethink like that:&lt;/P&gt;
&lt;P&gt;ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer m = Map.Layers[0] as&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;FeatureLayer featureLayer = m.Layers[0] as FeatureLayer;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;featureLayer.Visible = true;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;But it is not correct. How to fix?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 14:58:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181140#M792</guid>
      <dc:creator>AnatoliiTerentiev</dc:creator>
      <dc:date>2014-10-30T14:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layer visibility in arcgis API for WPF?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181141#M793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To change the visibility of an ArcGISDynamicMapServiceLayer sublayer you can use&amp;nbsp; SetLayerVisibility(&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;int&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; layerID, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;bool&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; visible)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;For example in your case: m.SetLayerVisibility(0, true);&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Note that an ArcGISDynamicMapServiceLayer doesn't load any feature at client side.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;If you want to be able to select, highlight, edit... features at client side you need to use a FeatureLayer instead.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 15:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181141#M793</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2014-10-30T15:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layer visibility in arcgis API for WPF?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181142#M794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Must I use next code in xaml:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14146901853326315" jivemacro_uid="_14146901853326315"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:Map x:Name="Map" Background="White" WrapAround="true" &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Extent="6095000,6810000,6900000,7258000" &amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISDynamicMapServiceLayer ID="BaseLayer" &lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer" rel="nofollow" target="_blank"&gt;http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer&lt;/A&gt;&lt;SPAN&gt;" /&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="roads" &lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer/1" rel="nofollow" target="_blank"&gt;http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer/1&lt;/A&gt;&lt;SPAN&gt;" /&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Map&amp;gt;&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;and use findTask on the FeatureLayer with the aim of further use results to mark features as selected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do I understand correctly that using only &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;ArcGISDynamicMapServiceLaye &lt;/SPAN&gt; I can set sublayer visible, but I can not set some&amp;nbsp; sublayers features&amp;nbsp; selected?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 17:31:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181142#M794</guid>
      <dc:creator>AnatoliiTerentiev</dc:creator>
      <dc:date>2014-10-30T17:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layer visibility in arcgis API for WPF?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181143#M795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that's an option but you might not need the find task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you created the feature layer, the features are loaded at client side and you could loop on features (featureLayer.Graphics) and select the features that fit with your criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option might be you to create a graphicsLayer instead of a FeatureLayer and to populate the graphicsLayer with the result of the FindTask. There is a sample here: &lt;A href="https://developers.arcgis.com/silverlight/sample-code/start.htm#Find" title="https://developers.arcgis.com/silverlight/sample-code/start.htm#Find"&gt;ArcGIS API for Silverlight - Interactive Samples | ArcGIS for Developers&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 17:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181143#M795</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2014-10-30T17:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layer visibility in arcgis API for WPF?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181144#M796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And can you explain in 2 words - what is the diference of using FeatureLayer and GraphicsLayer layer, what is the more right way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 18:03:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181144#M796</guid>
      <dc:creator>AnatoliiTerentiev</dc:creator>
      <dc:date>2014-10-30T18:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layer visibility in arcgis API for WPF?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181145#M797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure.&lt;/P&gt;&lt;P&gt;In a few words, its' an enhanced&amp;nbsp; version of the GraphicsLayer that enables displaying (and possibly editing) features from an ArcGIS Server REST service.&lt;/P&gt;&lt;P&gt;But better to point to the &lt;A href="http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer.html"&gt;FeatureLayer &lt;/A&gt;documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a FeatureLayer in Snapshot mode is 'almost' equivalent to a GraphicsLayers populated by yourself by the result of a query task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 19:33:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181145#M797</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2014-10-30T19:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to set layer visibility in arcgis API for WPF?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181146#M798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's clear. Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 14:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-set-layer-visibility-in-arcgis-api-for-wpf/m-p/181146#M798</guid>
      <dc:creator>AnatoliiTerentiev</dc:creator>
      <dc:date>2014-10-31T14:24:08Z</dc:date>
    </item>
  </channel>
</rss>

