Hello, I get KeyNotFoundException (ConcurrentDictionary) error in RemoveTile method:
Telerik.Windows.Controls.Map.TilesDownloadManager:
I wrote about it here: https://feedback.telerik.com/wpf/1656461-keynotfoundexception-when-zooming-in
But in version 2024.4.1111 only 1 problem was fixed...
ConcurrentDictionary<TileId, TileSource> requests may not contain TileId key in RemoveTile.
Can you fix this in the next release?
Add built-in support for elevation, routing and search location services coming from the Azure Maps service. These are the same features as in the BingRestMapProvider, which will be obsolete in 2025.
Hi, we use the map control in our application.
We get random KeyNotFoundException in TilesDownloadManager when zooming in...
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. in System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey key) in Telerik.Windows.Controls.Map.TilesDownloadManager.UpdateTileCache() in Telerik.Windows.Controls.Map.TilesDownloadManager.Process() in Telerik.Windows.Controls.Map.TilesDownloadManager.DownloaderThread() in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in System.Threading.ThreadHelper.ThreadStart()
System.Collections.Generic.KeyNotFoundException in System.Collections.Concurrent.ConcurrentDictionary`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Item(System.__Canon) in Telerik.Windows.Controls.Map.TilesDownloadManager.RemoveTile(Telerik.Windows.Controls.Map.TileId) in Telerik.Windows.Controls.Map.TilesDownloadManager.RemoveL1Cache() in System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) in System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) in System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) in System.Threading.ThreadHelper.ThreadStart()
We use OpenStreetMapProvider and don't use tile caching.
i have UriVectorTileMapProvider and i have files pbf.
When i create my style file json i cant get render corectly.
i have two example:
1)one in my style json i have three layers:buildings,military,hospital (ex1.png)
When I use such a file, one polygon is lying with buildings on top where the other polygon covers the buildings
"layers": [
{
"id": "landcover_wood",
"type": "fill",
"source": "openmaptiles",
"source-layer": "landuse",
"filter": [
"==",
"class",
"military"
],
"layout": {
"visibility": "visible"
},
"paint": {
"fill-color": "green"
}
},
{
"id": "landcover_hos",
"type": "fill",
"source": "openmaptiles",
"source-layer": "landuse",
"filter": [
"==",
"class",
"hospital"
],
"layout": {
"visibility": "visible"
},
"paint": {
"fill-color": "yellow"
}
},
,
{
"id": "building",
"type": "fill",
"source": "openmaptiles",
"source-layer": "building",
"minzoom": 12,
"maxzoom": 24,
"paint": {
"fill-color": {
"stops": [
[
13,
"yellow"
],
[
16,
"red"
]
]
}
}
}
]
2) if i have this style json, telering dont recognize color for every layers like hospital or military i have black (ex2.png)
"layers": [
whats wrong with my json file style?
When you inherit BingRestMapProvider and BingRestTileMapSource, following the custom map provider approach
https://docs.telerik.com/devtools/wpf/controls/radmap/how-to/howto-custom-provider
the map does not display any tiles. This is due to internal property TopLayer not set correctly to the TileMapSource class.
When the VisualizationLayer is populated with FrameworkElement objects (often through the ItemTemplate) and the MapLayer.Location value of a FrameworkElement is updated at runtime, the element itself is not moved to the new location. This happens only if the FrameworkElement is outside of the viewport during the location change action.
To work this around, on location change, remove the data element from the ItemsSource and add it again.
The ZIndex property change is not detected by the VisualizationLayer at runtime.
Workaround: remove and then add back the item where the ZIndex is changed.
Good Afternoon,
we use the RadMap's SelectionRectangleChanged event to allow the user to (de)select map elements with the box. In the event handler we use the layer's GetItemsInRectangle function to see what is within the selected area but this is where we encounter a problem with LineData objects. Dragging a selection rectangle that does not touch an edge but is close enough to it (likely within the bounding box of the LineData) it incorrectly recognizes the line as within the rectangle. See the attached screenshot for an example of a selection rectangle that should contain no elements within but actually reports the long line to its right as an element it contains. This can also be reproduced with the attached project:
Regards
Dominik Schacht