Last Updated:
15 Aug 2019 15:27
by ADMIN
RadMap: Pins have wrong location when ZoomLevel is 1 and the map is resized vertically
To reproduce:
1. Add a pin to the map.
radMap1.Layers.Add(new MapLayer("PinLayer"));
MapPin pin = new MapPin(new Telerik.WinControls.UI.Map.PointG(47.60357, -122.32945));
pin.BackColor = Color.Red;
radMap1.Layers[0].Add(pin);
2. Run the project and zoom out.
3. Resize vertically the map(form).
Workaround:
Call Pan method to recalculate RadMapElement.ViewportInPixels on SizeChanged.
private void RadMap1_SizeChanged(object sender, EventArgs e)
{
this.radMap1.Pan(this.radMap1.MapElement.PanOffset.Width, this.radMap1.MapElement.PanOffset.Height);
}