Completed
Last Updated: 26 Apr 2022 13:22 by ADMIN
Release R2 2022
This exception occurs in Net 6. When we have applied LocalFileCacheProvider and there is one file in the cache folder, starting the app will throw the ArgumentOutOfRangeException. A possible solution here is to check if there is one file inside the folder and remove it if there is such.
Completed
Last Updated: 30 Dec 2021 08:10 by ADMIN
Release R1 2022

The ShapeFileReader fails in its ReadDbfRecord method:

            using (MemoryStream shapeStream = new MemoryStream(File.ReadAllBytes(@"C:\Users\dyordano\Downloads\84aa4699-f436-4b7e-b029-e353fdab0411_shapefile-before-modification\asseuappareil.shp")))
            {
                using (MemoryStream dbfStream = new MemoryStream(File.ReadAllBytes(@"C:\Users\dyordano\Downloads\84aa4699-f436-4b7e-b029-e353fdab0411_shapefile-before-modification\asseuappareil.dbf")))
                {
                    ShapeFileReaderParameters parameters = new ShapeFileReaderParameters();
                    parameters.ShapeStream = shapeStream;
                    parameters.DbfStream = dbfStream;
                    ShapeFileReader reader = new ShapeFileReader();
                    List<MapVisualElement> elements = reader.Read(parameters);
                }
            }

Completed
Last Updated: 12 Jul 2021 07:37 by ADMIN
Release R3 2021 (LIB 2021.2.712)
If you apply 'left' padding to a callout, it wrongly applies to the right side as well.
Completed
Last Updated: 12 Jul 2021 07:37 by ADMIN
Release R3 2021 (LIB 2021.2.712)
The RadMap.Layers collection offers several overloads for the HitTest method:

- HitTest(PointG location)
- HitTest(PointL point)
- HitTest(Point location)

However, if the layer is not visible, its IsVisible property is set to false, the HitTest(PointL point) will not return the clicked pin, but the HitTest(PointG point) method will return it. This behavior is not consistent and all overloads should consider whether the layer is visible or not.
Completed
Last Updated: 12 Jul 2021 07:37 by ADMIN
Release R3 2021 (LIB 2021.2.712)

Hello,

on a german Windows, when searching with the bingmapsprovider for "München",

the tooltip on the Pin doesn't shows the ü in the correct way.

 

Completed
Last Updated: 12 Jul 2021 07:37 by ADMIN
Release R3 2021 (LIB 2021.2.712)
Please run the attached sample project and follow the steps from the gif file. You will notice that for ZoomLevel=19, clicking the pin shifts it on the left.
Completed
Last Updated: 09 Jun 2021 14:23 by ADMIN
Release R2 2021 SP1

Hi,

Please refer attached screen.

In a specific use case, it was required to add MapPins to a MapLayer, and later MapLayer to be added to a RadMap, and this exception.

Thanks

Completed
Last Updated: 31 May 2021 07:44 by ADMIN
Release R2 2021 SP1

Use the custom implementation in the following KB article: https://docs.telerik.com/devtools/winforms/knowledge-base/radmap-export-to-an-image?_ga=2.41263138.1402359144.1621138970-937174403.1607349180

The pins are successfully exported in version 2021.1.204:

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

  
Completed
Last Updated: 15 Apr 2021 13:36 by ADMIN
Release R2 2021

Run the attached project.
Expected: 
10 points on each row.
Actual:
There is a seemingly random number of points on each row:

Completed
Last Updated: 23 Apr 2020 16:12 by ADMIN
Release R2 2020 (LIB 2020.1.423)

Hello,

I am using RadMap to display a KML file.

Unfortunately, it looks like RadMap is not displaying properly all the shapes (departments).

Displayed with RadMap (few holes, ie departments not displayed): 

 

Displayed with a third party tool (all departments properly displayed):

I have attached the KML file in a zip file.

 Best,

Olivier 

Completed
Last Updated: 22 Jan 2020 11:12 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 2
Category: Map
Type: Bug Report
0
To reproduce: add a RadMap with a Bing provider, select the canvas "Aerial with labels on demand" and zoom in all the way. It always gets the following exception:

System.ArgumentException: Parameter is not valid.
   at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
   at Telerik.WinControls.UI.MapTileDownloader.TileDownloadDataCompleted(Object sender, DownloadDataCompletedEventArgs e)
   at System.Net.WebClient.OnDownloadDataCompleted(DownloadDataCompletedEventArgs e)

The issue is reproducible in Demo application with the Bing examples.

Workaround:

        public RadForm1()
        {
            InitializeComponent();

            string cacheFolder = @"..\..\cache";
            BingRestMapProvider bingProvider = new Telerik.WinControls.UI.BingRestMapProvider();
            bingProvider.TileDownloader = new CustomMapTileDownloader();
            bingProvider.UseSession = true;
            bingProvider.BingKey = "your bing key";
            LocalFileCacheProvider cache = new LocalFileCacheProvider(cacheFolder);
            bingProvider.CacheProvider = cache;
            this.radMap1.Providers.Add(bingProvider);
             
        }

        public class CustomMapTileDownloader : MapTileDownloader
        {
            protected override void TileDownloadDataCompleted(object sender, System.Net.DownloadDataCompletedEventArgs e)
            {
                TileInfo tileInfo = ((TileInfo)e.UserState);

                if (e.Error == null)
                {
                    try
                    {
                        using (MemoryStream ms = new MemoryStream(e.Result))
                        {
                            Image img = Image.FromStream(ms, true, true);
                            tileInfo.Content = e.Result;

                            this.OnTileDownloadComplete(new TileInfoEventArgs(tileInfo));

                            lock (this.webClientsPoolLockObject)
                            {
                                this.webClientsPool[tileInfo.Quadkey].DownloadDataCompleted -= this.TileDownloadDataCompleted;
                                this.webClientsPool.Remove(tileInfo.Quadkey);
                                this.webRequestCache.Remove(tileInfo.Quadkey);
                            }
                        }
                    }
                    catch (Exception)
                    {
                        
                        
                    }
                           
                    
                }
                else
                {
                    if (this.ShouldRetryDownload(e.Error))
                    {
                        Uri uri = this.webRequestCache[tileInfo.Quadkey];

                        lock (this.webClientsPoolLockObject)
                        {
                            uri = new Uri(this.webClientsPool[tileInfo.Quadkey].BaseAddress);
                            this.webClientsPool[tileInfo.Quadkey].DownloadDataCompleted -= this.TileDownloadDataCompleted;
                            this.webClientsPool.Remove(tileInfo.Quadkey);
                            this.webRequestCache.Remove(tileInfo.Quadkey);
                        }

                        this.BeginDownloadTile(uri, tileInfo);
                    }
                }
            }
        }
    }
Completed
Last Updated: 09 Jan 2020 16:06 by ADMIN
Release R1 2020

Recently OpenStreetMap changed their tile usage policy and require UserAgent string in the web headers for accessing tile.openstreetmap.org tiles.

https://operations.osmfoundation.org/policies/tiles/

As a result, standard open street map mode does not work - no tiles are loaded and "too many requests" error is returned from the server.

RadMap's OpenStreetMapProvider needs API (event, property or similar) for easier set up of UserAgent / Referer / other headers of web requests.

 

Completed
Last Updated: 08 Oct 2019 10:15 by ADMIN
Release R3 2019 SP1

Please refer to the sample project and follow the steps:

1. Run the attached application.
2. Hover over the calendar (custom cluster) 
3. Tooltip is shown.
4. Zoom out once 
5. Hover over the calendar.
6. No tooltip is shown - ToolTipTextNeeded is not called.
7. Zoom out once more.
8. Hover over the calendar.
9. No tooltip is shown - ToolTextNeeded is not called.
10. Zoom out once more. Now two icons are shown.
11. Hover over either calendar. 
12. Tooltip is shown.

Completed
Last Updated: 04 Oct 2019 11:02 by ADMIN
Release R3 2019 SP1

To reproduce:

set the clustering and add some pins upon a button click.

Workaround

Refresh with the following method:

Completed
Last Updated: 15 Aug 2019 15:27 by ADMIN
Release R3 2019 (LIB 2019.2.819)
To reproduce:
1. Add a pin to the map.
radMap1.Layers.Add(new MapLayer("PinLayer"));
MapPin pin = new MapPin(new Telerik.WinControls.UI.Map.PointG(47.60357, -122.32945));
pin.BackColor = Color.Red;
radMap1.Layers[0].Add(pin);
2. Run the project and zoom out.
3. Resize vertically the map(form).

Workaround:
Call Pan method to recalculate RadMapElement.ViewportInPixels on SizeChanged. 
private void RadMap1_SizeChanged(object sender, EventArgs e)
{
    this.radMap1.Pan(this.radMap1.MapElement.PanOffset.Width, this.radMap1.MapElement.PanOffset.Height);
}
Completed
Last Updated: 15 Mar 2018 15:03 by Dimitar
To reproduce: use the ToolTipTextNeeded event to assign some tool tips for the MapRoutes. You will notice that the tool tips are shown not only when you hover the route line but also around it.
Completed
Last Updated: 15 Mar 2018 14:42 by Dimitar
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: Map
Type: Bug Report
2
To reproduce:

        public RadForm1()
        {
            InitializeComponent();
            
            this.radMap1.ToolTipTextNeeded += radMap1_ToolTipTextNeeded;

            BingRestMapProvider bingProvider = new Telerik.WinControls.UI.BingRestMapProvider();
            bingProvider.UseSession = true;
            bingProvider.BingKey = bingKey;

            this.radMap1.Providers.Add(bingProvider);

            //add a layer to display the route
            this.radMap1.MapElement.Layers.Add(new MapLayer());

            RouteRequest request = new RouteRequest();
            request.DistanceUnit = DistanceUnit.Kilometer;
            request.Options.Mode = TravelMode.Driving;
            request.Options.Optimization = RouteOptimization.Time;
            request.Options.RouteAttributes = RouteAttributes.RoutePath;
            request.Options.RouteAvoidance = RouteAvoidance.None;
            request.Waypoints.Add("Paris, France");
            request.Waypoints.Add("Madrid, Spain");

            bingProvider.CalculateRouteCompleted += BingProvider_RoutingCompleted;
            bingProvider.CalculateRouteAsync(request);
        }

        private void radMap1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
        {
            Console.WriteLine(sender);
        }

        private void BingProvider_RoutingCompleted(object sender, RoutingCompletedEventArgs e)
        {

            List<PointG> pts = new List<PointG>();
            Telerik.WinControls.UI.Map.PointG startPoint = new Telerik.WinControls.UI.Map.PointG(e.Route.RoutePath.Line.Coordinates.First()[0], e.Route.RoutePath.Line.Coordinates.First()[1]);
            pts.Add(startPoint);
            Telerik.WinControls.UI.Map.PointG endPoint = new Telerik.WinControls.UI.Map.PointG(e.Route.RoutePath.Line.Coordinates.Last()[0], e.Route.RoutePath.Line.Coordinates.Last()[1]);
            pts.Add(endPoint); 
            MapPolyline mapPolyline = new MapPolyline(pts);
            mapPolyline.BackColor = Color.Red;
            mapPolyline.BorderColor = Color.Red;
            mapPolyline.BorderWidth = 5;
            this.radMap1.MapElement.Layers[0].Add(mapPolyline);

            PointG midPoint = new PointG((startPoint.Latitude + endPoint.Latitude) / 2d, (startPoint.Longitude + endPoint.Longitude) / 2d);
            MapLabel westernLabel = new MapLabel(midPoint, "My label")
            {
                BackColor = Color.FromArgb(122, 255, 0, 0)
            };
            this.radMap1.MapElement.Layers[0].Add(westernLabel);
        }

Workaround:

        public class CustomMapPolyline : MapPolyline
        {
            List<GraphicsPath> paths;

            public CustomMapPolyline(IEnumerable<PointG> points) : base(points)
            {
            }

            public override void ViewportChanged(IMapViewport viewport, ViewportChangeAction action)
            {
                base.ViewportChanged(viewport, action);

                FieldInfo fi = typeof(MapPolyline).GetField("paths", BindingFlags.Instance | BindingFlags.NonPublic);
                this.paths = (List<GraphicsPath>)fi.GetValue(this);
            }

                     public override bool HitTest(PointG pointG, PointL pointL, IMapViewport viewport)
            {
                using (Pen pen = new Pen(this.BorderColor, this.BorderWidth))
                {
                    foreach (GraphicsPath path in this.paths)
                    {
                        if (path.IsOutlineVisible(pointL.X, pointL.Y, pen))
                        {
                            return true;
                        }
                    }
                }

                return false;
            }
        }
Completed
Last Updated: 22 Feb 2018 12:36 by Dimitar
Workaround:
Public Class MyLocalMapProvider
    Inherits LocalMapProvider

    Public Overrides Sub ViewportChanged(viewport As IMapViewport, action As ViewportChangeAction)
        If Not Me.Initialized Then
            Me.Initialize()

            Return
        End If

        Dim tilesToDraw As List(Of MapVisualElement) = DirectCast(Me.GetType().BaseType.GetField("tilesToDraw", BindingFlags.Instance Or BindingFlags.NonPublic).GetValue(Me), List(Of MapVisualElement))

        Dim numOfTilesX As Integer = CInt(Math.Ceiling(CDbl((viewport.ViewportInPixels.Width)) / Me.TileSize.Width)) + 2
        Dim numOfTilesY As Integer = CInt(Math.Ceiling(CDbl((viewport.ViewportInPixels.Height)) / Me.TileSize.Height)) + 2
        Dim maxNumberOfTilesY As Integer = If((viewport.ZoomLevel = 1), 2, (viewport.ZoomLevel - 1) << 2)
        numOfTilesY = Math.Min(numOfTilesY, maxNumberOfTilesY)

        Dim topLeftTile As Point = MapTileSystemHelper.PixelXYToTileXY(-viewport.PanOffset.Width, -viewport.PanOffset.Height)

        Dim numberOfTiles As Integer = 2 << (viewport.ZoomLevel - 1)
        Dim startX As Integer = CInt(viewport.PanOffset.Width) Mod Me.TileSize.Width
        Dim startY As Integer = CInt(viewport.PanOffset.Height) Mod Me.TileSize.Height

        If startX > 0 Then
            startX -= Me.TileSize.Width
        End If

        For i As Integer = 0 To numOfTilesY - 1
            For j As Integer = 0 To numOfTilesX - 1
                Dim x As Integer = startX + j * Me.TileSize.Width
                Dim y As Integer = startY + i * Me.TileSize.Height

                Dim tileX As Integer = (topLeftTile.X + j) Mod numberOfTiles
                Dim tileY As Integer = (topLeftTile.Y + i) Mod numberOfTiles

                If tileX < 0 Then
                    tileX += numberOfTiles
                End If

                tilesToDraw.Add(New MapTile(Me.GetTileImage(tileX, tileY, viewport.ZoomLevel), New Rectangle(New Point(x, y), Me.TileSize)))
            Next
        Next
    End Sub
End Class
Completed
Last Updated: 05 Feb 2018 10:53 by Dimitar
How to reproduce: Change the current culture so that a comma is used as a decimal separator, the Elevations example will fail with a (400) Bar Request error.

Workaround: create a custom BingRestMapProvider class
public class CustomBingRestMapProvider : BingRestMapProvider
    {
        protected override string GetPointsString(List<PointG> points)
        {
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < points.Count; i++)
            {
                PointG point = points[i];

                if (i > 0)
                {
                    sb.Append(",");
                }

                sb.Append(point.Latitude.ToString(CultureInfo.InvariantCulture) + "," + point.Longitude.ToString(CultureInfo.InvariantCulture));
            }

            return sb.ToString();
        }
    }
1 2