Ability to refresh data for specific Map Layers. Currently the only way to update markers on Map is by calling Refresh on the Map component or issuing a StateHasChanged call.
Currently Maps does not support observable data, according to documentation: Databind to Observable Collection - Telerik UI for Blazor
Purpose: Ability to have "live" updating markers and/or shapes without calling MapRef.Refresh() which causes a full component "blink" and refresh in Edge, and to avoid StateHasChanged.
Example/Pseduo-Razor code:<TelerikMap @ref="MapRef">
<MapLayers>
<MapLayer Type="@MapLayersType.Marker" Data=@MyData" @ref="LayerRef" />
</MapLayers>
</TeleriKMap>
@code {
TelerikMap MapRef {get; set; }
TelerikMapLayer LayerRef { get; set; }
MyData = new List<MapMarker>() {
// Data in here
};
private void WholeComponentRefresh() {
MapRef.Refresh(); // Existing functionality
}
private void AddMarker() {
MyData.Add(new MapMarker()); // Map ignores this because it does not treat as observable
}
private void MyLayerRefresh() {
LayerRef.Refresh(); // If we don't have observable, could we at least get per-layer Refresh?
}
}