I have a map, and have a SelectionLayer defined. I wish to build up a MapPolyline as the user clicks on the map
I do the following
I have to call ArrangeItem otherwise I need to zoom the map a little to start the polyline being displayed.
The problem is that when I have 3 points, it does not draw the correct triangle, and only sorts itself out once I add a 4th point. Is there something else that I need to do?
Thanks
Simon
<
telerik:RadMap
Name
=
"radMap"
MapMouseClick
=
"radMap_MapMouseClick"
ZoomChanged
=
"radMap_ZoomChanged"
MouseMove
=
"radMap_MouseMove"
MouseDown
=
"radMap_MouseDown"
MouseUp
=
"radMap_MouseUp"
>
<
telerik:InformationLayer
x:Name
=
"SelectionLayer"
Initialized
=
"SelectionLayer_Initialized"
/>
</
telerik:RadMap
>
I do the following
private void AddSelectShape(Location location)
{
MapPolyline polyline = (MapPolyline)SelectionLayer.Items[0];
polyline.Points.Add(location);
polyline.ToolTip = polyline.Points.Count;
SelectionLayer.ArrangeItem(polyline);
}
private
void
SelectionLayer_Initialized(
object
sender, EventArgs e)
{
MapPolyline polyline =
new
MapPolyline();
polyline.Points =
new
LocationCollection();
SelectionLayer.Items.Add(polyline);
}
I have to call ArrangeItem otherwise I need to zoom the map a little to start the polyline being displayed.
The problem is that when I have 3 points, it does not draw the correct triangle, and only sorts itself out once I add a 4th point. Is there something else that I need to do?
Thanks
Simon