Hi.
I am using MapPolyline to draw paths on map.
Doing that I have two issues:
I also set direction with arrows by 100 to 100 meters...
my code:
I am using MapPolyline to draw paths on map.
Doing that I have two issues:
- In first place I am only been capable of creating a MapPolyline adding location by location. Is a way of adding for example a List of Locations?
- I have another issue that don't , know if is related to it or not but in part I know it does. If I add all my paths in a single polyline there isn't much lag; however If I split it by time (10:00, 11:00, 12:00,...) it takes too much time loading it in map. (I do believe that bing maps has something to do with it too, but I am unsure if I could use a more performing object or load it in a better way.)
I also set direction with arrows by 100 to 100 meters...
my code:
var line =
new
MapPolyline() { Stroke = color, StrokeThickness = 2 };
line.Points =
new
LocationCollection();
int
auxDistance = 0;
IGeo last =
null
;
foreach
(var point
in
route)
{
if
(auxDistance > 100)
{
auxDistance = 0;
BuildArrowAtPoints(last.Location, point.Location, color);
}
auxDistance += point.IODistance;
last = point;
line.Points.Add(point.Location);
}
RoutesLayer.Items.Add(line);
}
SetBestView(SpeedLayer,
this
.Map);