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?
}
}
Hello
Is it possible to get the map to support Geolocation? Something like whats on the openstreetmap website map where you can click the location button and the map then moves to where your location is. Maybe some event that we can listen on to get the Latitude and Longitude of the users location which we can then use to manipulate the map?
Phil
If I set a global font icon type, the Map icons are broken, because they are missing the k-font-icon CSS class. A possible workaround is to apply the missing styles to the rendered k-icon class:
In the meantime, one can use SVG icons or the following CSS rule as a workaround:
.k-map .k-icon {
width: 1em;
height: 1em;
outline: 0;
font-size: 16px;
font-family: "WebComponentsIcons";
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1;
speak: none;
text-transform: none;
text-decoration: none;
flex-shrink: 0;
display: inline-flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
vertical-align: middle;
position: relative;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
The event would fire when the map zoom level has changed.
===
ADMIN EDIT: The new zoom level should be accessible in the event handler.
Currently, the marker tooltip can be shown only when hovering the marker. I want to show the tooltip when the user clicks the marker.
Example use case:
I've included clickable elements in the tooltip. The tooltip is hidden as soon as the mouse leaves the marker and the user cannot interact with the tooltip elements.
Add marker clustering support to the Telerik UI for Blazor Map control. When a map with many close to each other markers is viewed, they should group together.