Hello,
The existing ViewPortChanged event of the RadMap should notify the user of Pan and Zoom behaviors. There were two issues related to how the event got raised.
1. The ViewportChanged event was called toŠ¾ many times for Pan with duplicate values. Now it will be called only when the PanOffset is changed.
2. The event was not called at all for the Zoom case with ViewportChangeaction.Zoom. Now when the user zooms this event will be called 3 times: one time for Pan and one time for Zoom and one time for both. The last time the ViewportChangeAction will be All.
this.radMap1.MapElement.ViewportChanged += MapElement_ViewportChanged;
private void MapElement_ViewportChanged(object sender, ViewportChangedEventArgs e)
{
if(e.Action == ViewportChangeAction.Pan)
{
Console.WriteLine("Down " + this.radMap1.MapElement.PanOffset.Width + ", " + this.radMap1.MapElement.PanOffset.Height);
}
if (e.Action == ViewportChangeAction.Zoom)
{
Console.WriteLine(this.radMap1.MapElement.ZoomLevel);
}
}
Regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.