Last Updated: 31 May 2021 07:44 by ADMIN
Release R2 2021 SP1
Created on: 19 May 2021 07:07
Category: Map
Type: Bug Report
RadMap: Pins are not exported after upgrading to R2 2021

Use the custom implementation in the following KB article:

The pins are successfully exported in version 2021.1.204:

After upgrading to version 2021.2.511, the pins are not exported anymore:

1 comment
Dess | Tech Support Engineer, Principal
Posted on: 19 May 2021 08:04

Hi, Ketan,

We have refactored the MapPin's rendering which affects the implementation in the KB article. You can use the following export option in the latest version:

        public static Bitmap ToImage(RadMap map, MapLayer layer)
            var mapElement = map.MapElement;

            var bitmap = new Bitmap((int)mapElement.ViewportInPixels.Size.Width, (int)mapElement.ViewportInPixels.Height);
            var g = new RadGdiGraphics(Graphics.FromImage(bitmap));

            foreach (MapVisualElement element in mapElement.Providers[0].GetContent(mapElement))
                element.Paint(g, mapElement);

            object state = g.SaveState();

           //comment this line
           // g.TranslateTransform(-mapElement.ViewportInPixels.X, -mapElement.ViewportInPixels.Y);

            layer.Paint(g, mapElement);


            return bitmap;

We will update the KB article accordingly.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Dess | Tech Support Engineer, Sr.
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.