When Windows 11 Dark themes are applied the Legend items panel back color is not changed. This behavior is observed in the following themes:
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);
}
}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.
Hi,
An exception is thrown while adding layers without name. (System.InvalidOperationException: 'A layer with the same Name already exists in the collection.')
i.e
var layer1 = new MapLayer();
var layer2 = new MapLayer();
map.Layers.Add(layer1);
map.Layers.Add(layer2);
The simple fix is to always pass a unique name, but it must work like say DataTable.Columns.Add(); (which internally generates unique name)
Thanks
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
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:
Run the attached project.
Expected:
10 points on each row.
Actual:
There is a seemingly random number of points on each row:
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
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);
}
}
}
}
}
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.
I have noticed in the routing there is no maxSolutions parameter available when querying the bing map api routing parameter.
https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-route
Please refer to the sample project and follow the steps:
1. Run the attached application.