<?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 Custom WebTiledLayer: how to set Attribution correctly? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/custom-webtiledlayer-how-to-set-attribution/m-p/1639859#M13626</link>
    <description>&lt;P&gt;I have implemented my own version of WebTiledLayer.&lt;BR /&gt;Since WebTiledLayer is a sealed class, I had to inherit from&amp;nbsp;ServiceImageTiledLayer.&lt;/P&gt;&lt;P&gt;I have implemented the&amp;nbsp;GetTileUriAsync() function and it works fine.&lt;/P&gt;&lt;P&gt;Now, I would like to set the Attribution property, but it not virtual and readonly property from parent class Layer.&lt;BR /&gt;WebTiledLayer seems to have its own redefinition of Attribution property, which magically also set the Layer.Attribution property.&lt;BR /&gt;&lt;BR /&gt;I tried to do the same with my implemention by hiding the parent property with the "new" keyword: new public string Attribution { get; set; }&lt;BR /&gt;But as expected the parent property is never set, and when my custom&amp;nbsp;WebTiledLayer is used the empty Layer.Attribution is used instead of my new Attribution property.&lt;BR /&gt;&lt;BR /&gt;How can I set correctly the parent Layer.Attribution property so that it is correctly displayed at the bottom left of the SceneViewer?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jube&lt;/P&gt;</description>
    <pubDate>Wed, 06 Aug 2025 22:16:03 GMT</pubDate>
    <dc:creator>Jube</dc:creator>
    <dc:date>2025-08-06T22:16:03Z</dc:date>
    <item>
      <title>Custom WebTiledLayer: how to set Attribution correctly?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/custom-webtiledlayer-how-to-set-attribution/m-p/1639859#M13626</link>
      <description>&lt;P&gt;I have implemented my own version of WebTiledLayer.&lt;BR /&gt;Since WebTiledLayer is a sealed class, I had to inherit from&amp;nbsp;ServiceImageTiledLayer.&lt;/P&gt;&lt;P&gt;I have implemented the&amp;nbsp;GetTileUriAsync() function and it works fine.&lt;/P&gt;&lt;P&gt;Now, I would like to set the Attribution property, but it not virtual and readonly property from parent class Layer.&lt;BR /&gt;WebTiledLayer seems to have its own redefinition of Attribution property, which magically also set the Layer.Attribution property.&lt;BR /&gt;&lt;BR /&gt;I tried to do the same with my implemention by hiding the parent property with the "new" keyword: new public string Attribution { get; set; }&lt;BR /&gt;But as expected the parent property is never set, and when my custom&amp;nbsp;WebTiledLayer is used the empty Layer.Attribution is used instead of my new Attribution property.&lt;BR /&gt;&lt;BR /&gt;How can I set correctly the parent Layer.Attribution property so that it is correctly displayed at the bottom left of the SceneViewer?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jube&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 22:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/custom-webtiledlayer-how-to-set-attribution/m-p/1639859#M13626</guid>
      <dc:creator>Jube</dc:creator>
      <dc:date>2025-08-06T22:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom WebTiledLayer: how to set Attribution correctly?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/custom-webtiledlayer-how-to-set-attribution/m-p/1641431#M13629</link>
      <description>&lt;P&gt;Nice catch. This is actually a bit of an oversight and should have been publicly settable from subclasses. I'll log an internal bug.&lt;BR /&gt;For now, here's a totally unsupported way to achieve it using reflection. This may or may not work in the future (tested on 200.8 but should likely work on older versions too):&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private void SetAttribution(string attribution)
{
    var field = typeof(Esri.ArcGISRuntime.Mapping.ImageTiledLayer).GetField("_coreReference", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
    var method = field.FieldType.GetMethod("SetAttribution", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
    method.Invoke(field.GetValue(this), new object[] { attribution });
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 12 Aug 2025 23:33:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/custom-webtiledlayer-how-to-set-attribution/m-p/1641431#M13629</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2025-08-12T23:33:12Z</dc:date>
    </item>
  </channel>
</rss>

