Unplanned
Last Updated: 17 Jul 2024 12:57 by ADMIN
Dan
Created on: 17 Jul 2024 12:44
Category: Map
Type: Bug Report
0
RadMap: Transparent images are not rendered correctly
In this case, we have 2 providers. The first one is regular OpenStreetMap and the second one with a different ImageURL address is rendered on top. The tile images downloaded from the second provider are transparent. However, this transparency is not respected from the control and the transparent areas are drawn with black color. 
1 comment
ADMIN
Dinko | Tech Support Engineer
Posted on: 17 Jul 2024 12:57

Hello Dan,

Thank you for reporting this behavior. As a workaround, we could customize the PaintProvidersContent() method inside the RadMapElement:

class MyMapElement : RadMapElement
{
    protected override void PaintProvidersContent(IGraphics graphics)
    {
        if (this.MiniMapElement.IsAnimating)
        {
            base.PaintProvidersContent(graphics);
            return;
        }
        foreach (IMapProvider provider in this.Providers)
        {
            foreach (MapVisualElement item in provider.GetContent(this))
             {
                item.Paint(graphics, this);
             }
        }
    }
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadMapElement);
        }
    }
}

class MyRadMap : RadMap
{
    protected override RadMapElement CreateMapElement()
    {
        return new MyMapElement();
    }
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadMap).FullName;
        }
        set
        {
            base.ThemeClassName = value;
        }
    }
}

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.