i don't get how to vertex has same coordinates the problem is i select vertex of the route then calculate their route with a point, the problem is in vertex collection it adds same points(gives no error) and in distance collection same distance is added but when that duplicate point in dictonary it gives error of same key added. and it skips that point
foreach (PointShape p in md1)
{
routingLayer.StartPoint = p;
routingLayer.EndPoint = g;
RoutingResult sp = routingEngine2.GetRoute(routingLayer.StartPoint, routingLayer.EndPoint);
distance = sp.Route.GetLength(GeographyUnit.DecimalDegree, DistanceUnit.Meter);
routingLayer.Routes.Clear();
rs.Features.Clear();
if (distances.Count == 0)
{
distances.Add(distance);
final.Add(distance, p);
}
else if (distance == distances[index])
{
continue;
}
else
{
index++;
distances.Add(distance);
final.Add(distance, p);
}
because of this
it skips a vetex which is more appropirate and select vertex next to it