<?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 Adding a raster layer to map in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-to-map/m-p/1175743#M8157</link>
    <description>&lt;P&gt;In an addin i'm creating there's a button that will add a raster layer to my map based on a selected value in a listbox. The code is simple and works fine: the new layer appears in the TOC and the image appears on the map, but curiously all visibility checkboxes on layers in the TOC become greyed out for a while. After a minute or so, they become enabled again. I'm guessing something is going on in a background thread that is setting the visibility checkboxes to disabled while it is doing whatever it is doing. The question is what is it doing?&amp;nbsp; The images are around 10mb each and georeferenced.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;    private async void cmd_ButtonAdd_Click(Object sender)
    {
      Layer pImgLay;
      string url = selectedObliqueVal;
      url = m_imgPath + m_Isle + m_imgFolder + "A" + url.Substring(1, 1) + @"\" + url + ".jpg";

      if (!System.IO.File.Exists(url))
      {
        MessageBox.Show("File does not exist:\r\n" + url);
        return;
      }
      pImgLay = await QueuedTask.Run(() =&amp;gt; { return LayerFactory.Instance.CreateLayer(new Uri(url), MapView.Active.Map); });
      _addedImages.Add(url);
      //MessageBox.Show("Add");
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 20:54:40 GMT</pubDate>
    <dc:creator>BerndtNording</dc:creator>
    <dc:date>2022-05-19T20:54:40Z</dc:date>
    <item>
      <title>Adding a raster layer to map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-to-map/m-p/1175743#M8157</link>
      <description>&lt;P&gt;In an addin i'm creating there's a button that will add a raster layer to my map based on a selected value in a listbox. The code is simple and works fine: the new layer appears in the TOC and the image appears on the map, but curiously all visibility checkboxes on layers in the TOC become greyed out for a while. After a minute or so, they become enabled again. I'm guessing something is going on in a background thread that is setting the visibility checkboxes to disabled while it is doing whatever it is doing. The question is what is it doing?&amp;nbsp; The images are around 10mb each and georeferenced.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;    private async void cmd_ButtonAdd_Click(Object sender)
    {
      Layer pImgLay;
      string url = selectedObliqueVal;
      url = m_imgPath + m_Isle + m_imgFolder + "A" + url.Substring(1, 1) + @"\" + url + ".jpg";

      if (!System.IO.File.Exists(url))
      {
        MessageBox.Show("File does not exist:\r\n" + url);
        return;
      }
      pImgLay = await QueuedTask.Run(() =&amp;gt; { return LayerFactory.Instance.CreateLayer(new Uri(url), MapView.Active.Map); });
      _addedImages.Add(url);
      //MessageBox.Show("Add");
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 20:54:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-to-map/m-p/1175743#M8157</guid>
      <dc:creator>BerndtNording</dc:creator>
      <dc:date>2022-05-19T20:54:40Z</dc:date>
    </item>
  </channel>
</rss>

