<?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: Add a specific layer from a Map Service  in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841075#M3809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;using Pro or ArcMap add the layers you want from the database and create a new feature service and publish it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Apr 2019 13:34:31 GMT</pubDate>
    <dc:creator>RobertBorchert</dc:creator>
    <dc:date>2019-04-17T13:34:31Z</dc:date>
    <item>
      <title>Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841072#M3806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I have updated this question from struggling to add a specific layer from a map service (as I have managed to work this out) to having a problem with adding raster layers (don't work) vs adding vector layers (which do work!).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a map service which has many layers of type "Raster Layer".&amp;nbsp; It is stored on Portal. I can locate the exact layer I want (it's a single layer) - but when I add it to the map - the result never shows in the map.&amp;nbsp; I just have an empty map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However - if you change the code ever so slightly below to work against a Map Service with just vector/feature based layers - the layer loads ABSOLUTELY FINE!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So why is this not working for raster layers ?? This is beyond frustrating!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;public static async void AddLayerToView()
 {
 &amp;nbsp;&amp;nbsp;&amp;nbsp;Uri portalUri = new Uri("https://fooserver.foocompany.local/portal");

&amp;nbsp;&amp;nbsp;&amp;nbsp; var portal = ArcGISPortalManager.Current.GetPortal(portalUri);
 &amp;nbsp;&amp;nbsp; var owner = portal.GetSignOnUsername();
 &amp;nbsp;&amp;nbsp;&amp;nbsp;var portalInfo = await portal.GetPortalInfoAsync();

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get all web maps and map services - include user, organization
 &amp;nbsp;&amp;nbsp;&amp;nbsp;// and "foo" in the title
 &amp;nbsp;&amp;nbsp;&amp;nbsp;var query2 = PortalQueryParameters.CreateForItemsOfTypes(new List&amp;lt;PortalItemType&amp;gt;() {
 &amp;nbsp;&amp;nbsp;&amp;nbsp;PortalItemType.WebMap, PortalItemType.MapService, PortalItemType.Layer}, owner, "", "Title:Foo");
 &amp;nbsp;&amp;nbsp;&amp;nbsp;query2.OrganizationId = portalInfo.OrganizationId;

&amp;nbsp;&amp;nbsp;&amp;nbsp;//retrieve in batches of up to a 100 each time
 &amp;nbsp;&amp;nbsp;&amp;nbsp;query2.Limit = 100;

&amp;nbsp;&amp;nbsp;&amp;nbsp;//Loop until done
 &amp;nbsp;&amp;nbsp;&amp;nbsp;var portalItems = new List&amp;lt;PortalItem&amp;gt;();
 &amp;nbsp;&amp;nbsp;&amp;nbsp;while (query2 != null)
 &amp;nbsp;&amp;nbsp;&amp;nbsp;{
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//run the search
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PortalQueryResultSet&amp;lt;PortalItem&amp;gt; results = await portal.SearchForContentAsync(query2);
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;portalItems.AddRange(results.Results);
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query2 = results.NextQueryParameters;
 &amp;nbsp;&amp;nbsp;&amp;nbsp;}

 &amp;nbsp;&amp;nbsp; RasterLayer rasterLayer = null;
    //Layer vectorLayer = null;  //UNCOMMENT FOR VECTOR

 &amp;nbsp;&amp;nbsp;&amp;nbsp;//process results
 &amp;nbsp;&amp;nbsp;&amp;nbsp;foreach (var pi in portalItems)
 &amp;nbsp;&amp;nbsp;&amp;nbsp;{
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string itemID = pi.ID;
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Item currentItem = ItemFactory.Instance.Create(itemID, ItemFactory.ItemType.PortalItem);

 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await QueuedTask.Run(() =&amp;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;var subItems = currentItem.GetItems();

 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach (var item in subItems)
 &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;if (item.Name == "MY_LAYER_NAME_TO_MATCH_ON")
 &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;if (LayerFactory.Instance.CanCreateLayerFrom(item))
 &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;&amp;nbsp;&amp;nbsp;rasterLayer = (RasterLayer)LayerFactory.Instance.CreateLayer(item, MapView.Active.Map);
                   //vectorLayer = LayerFactory.Instance.CreateLayer(item, MapView.Active.Map);&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//UNCOMMENT FOR VECTOR&lt;/PRE&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;}&lt;BR /&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;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;PS - Is there any way to make the above look more like code layout.&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841072#M3806</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2021-12-12T16:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add a specific layer from a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841073#M3807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your best option is to create a new service that only has the layers you want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:27:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841073#M3807</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2019-04-17T13:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Add a specific layer from a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841074#M3808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Impossible as I have over 40,000 layers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:31:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841074#M3808</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2019-04-17T13:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add a specific layer from a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841075#M3809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;using Pro or ArcMap add the layers you want from the database and create a new feature service and publish it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841075#M3809</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2019-04-17T13:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add a specific layer from a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841076#M3810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't need a feature service - as no editing is required. I only need to query for a specific layer.&amp;nbsp; I can't make thousands of map services for each individual layer be it raster or vector it would be crazy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:42:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841076#M3810</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2019-04-17T13:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add a specific layer from a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841077#M3811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cannot you simply connect to the database and add the specific raster you want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:45:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841077#M3811</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2019-04-17T13:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add a specific layer from a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841078#M3812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want the data to be stored centrally (on a hosted server) not via a Geodatabase or ArcSDE, that's why I thought ArcGIS Portal should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841078#M3812</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2019-04-17T13:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add a specific layer from a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841079#M3813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The data is stored somewhere.&amp;nbsp; Most commonly an SDE database.&amp;nbsp; We have our Portal set up with datastores and redundancy etc.&amp;nbsp; The Portal still needs to find the data somewhere.&amp;nbsp; We have it in an SDE Oracle database&amp;nbsp; on our company system.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The map service was created by someone with all 40000 raster files being referenced.&amp;nbsp; Somewhere there is an&amp;nbsp; MXD or Pro Project that was used to create the service.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In any event you should still be able to access the rasters wherever the database is that is storing them and add them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless that is the raster dataset does not belong to your organization and you are adding them from a web service.&amp;nbsp; Such as in my location we can add raster air photography, which itself contains many thousands of rasters.&amp;nbsp; In this case you do not have the option of loading specific rasters without the proper permissions from the owner.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2019 13:53:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841079#M3813</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2019-04-17T13:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add a specific layer from a Map Service</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841080#M3814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I created the services with ArcMap and there is a File Geodatabase backing the Map Services - but I don't want to access the FGDB - as it takes too long to connect and open it up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2019 14:16:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841080#M3814</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2019-04-17T14:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841081#M3815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can add an entire feature service or just one layer to your map using the CreateLayer method on the LayerFactory. To add just one layer, you use the layer ID. Like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt; url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;@"http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;//FeatureLayer off a map service or feature service&lt;/SPAN&gt;

Uri uri &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Uri&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uri&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a code snippet for this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#create-and-add-a-layer-to-the-active-map" rel="nofollow noopener noreferrer" target="_blank"&gt;Create and add a layer to the active map&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To access data via databases - you can use connection properties. Here are some code snippets for this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#opening-an-enterprise-geodatabase-using-connection-properties" rel="nofollow noopener noreferrer" target="_blank"&gt;Opening an Enterprise Geodatabase using connection properties&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#opening-an-enterprise-geodatabase-using-sde-file-path" rel="nofollow noopener noreferrer" target="_blank"&gt;Opening an Enterprise Geodatabase using sde file path&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#getting-database-connection-properties-from-a-connection-file" rel="nofollow noopener noreferrer" target="_blank"&gt;Getting Database Connection Properties from a Connection File&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841081#M3815</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2021-12-12T10:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841082#M3816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply - as you can see I have updated my code and modified the question slightly - I know how to add a single layer from a service but I still fail to add a raster based layer - it is always null and nothing appears in the map view - can you help with that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2019 08:53:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841082#M3816</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2019-04-18T08:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841083#M3817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to reproduce this behavior you are seeing. Will investigate and let you know.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2019 20:05:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841083#M3817</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2019-04-18T20:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841084#M3818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon&lt;/P&gt;&lt;P&gt;You cannot add raster sublayers (that is, raster layers inside a map service) individually to Pro. This&amp;nbsp;is by-design.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 20:21:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841084#M3818</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2019-04-22T20:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841085#M3819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Uma,&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's interesting, I'm wondering if you can tell me why this is the case, what's the thinking behind designing the map service in such a way - bearing in mind you have this behaviour if you toggle WMS for the map service or if you work with a map service which has published featureclasses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Simon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2019 15:28:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841085#M3819</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2019-05-08T15:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841086#M3820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Uma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate a more detailed response to this as it is critical to the project I am currently on with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;P&gt;Simon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2019 13:48:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841086#M3820</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2019-05-13T13:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841087#M3821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Simon,&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;map service was designed, back in the day, to draw features on the server side and return image in png/jpg etc. format for web clients to consume/use data that are disseminated over web. It also supports query operations for feature layer -- therefore advanced clients can download features and have them drawn on the client side. That's why it works for you when you create a feature layer with a url pointing to a feature-layer off a map service.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;But map service was never designed to return raw raster/image dataset.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;We have Image service for that reason, that returns raw raster data (similar to OGC - where wms for maps and wcs for raster data). Therefore raster layer can't be created in Pro pointing to a raster layer off a map service.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;please refer to the following to learn more about Image Service Layer and see whether it helps in your workflow.&lt;/DIV&gt;&lt;DIV&gt;&lt;A data-auth="NotApplicable" href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Map-Authoring#working-with-image-service-layers" rel="noopener noreferrer" target="_blank"&gt;https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Map-Authoring#working-with-image-service-layers&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Otherwise, if you give us your entire workflow, we will see what best way your use case can be addressed. All I see is that you want to add them individually - not sure why? (sorry if I missed/overlooked that) -- pls let me know&amp;nbsp;what do you want to do with that layer once added -&amp;nbsp; do you just want to draw or do you want to performance some identify operation/analysis etc. afterwards?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;Tanu&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 16:49:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841087#M3821</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2019-06-10T16:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841088#M3822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tanu, sorry for the late reply (I didn't recieve a notification or didn't notice one).&lt;/P&gt;&lt;P&gt;The workflow is to browse several hundred map services - inside each one there may just be Feature Layers published, or rasters, all in all there are tens of thousands of individual layers. The user is not aware of all these hundreds of map services - the UI in Pro hides this all away.&lt;/P&gt;&lt;P&gt;All they are presented with is a nice UI in Pro - which allows them to query layers spread accross all the map services - from there they can filter down and pick some (or just one) layers of interest&amp;nbsp;(I mean that in a generic sense i.e. can be either raster or feature layer type) - then they ask those layers to be added to the Map in Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code behind does things like searching and caching what it has found amongst the map services - all via REST api calls - in the end the specific layers are found and then added to the Map view inside Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user is not anything fancy with the layers - it's a means to view and inspect some of the attribute data perhaps - but certainly no advanced geoprocessing tasks or anything like that.&amp;nbsp; It's essentially a huge data repository stored in the cloud via Portal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats the workflow - it's not complicated as you can see - it's just basically find me data and show it in Pro.&amp;nbsp; Data stored centrally in the cloud/ArcGIS Enterprise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I look forward to your thoughts. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2019 14:36:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841088#M3822</guid>
      <dc:creator>Vidar</dc:creator>
      <dc:date>2019-08-15T14:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a raster layer from a map service results in null layer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841089#M3823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon&lt;/P&gt;&lt;P&gt;No worries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you see the layer type is 'raster', can you add that as a map service layer?&lt;/P&gt;&lt;P&gt;If you use 'dynamic layers' capability to remove all other sub-layers from the map service layer. This will allow you to see the layer on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2019 19:12:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/adding-a-raster-layer-from-a-map-service-results/m-p/841089#M3823</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2019-08-15T19:12:36Z</dc:date>
    </item>
  </channel>
</rss>

