Are you using a newer build of map suite routing explorer? In my second response I used routing explorer v. 1.0, and I still get wrong result.
If I right click and select route from here and route to here en the same road where no dots / crosing roads i get this error message: "the parameter you provided is invalid, please make sure that the start and the end are not null nor equal, the stops count is not 0."
Just for funn I uninstalled map desktop & routing, reinstalled and updated to 6.0.0.114, but still get the wrong result.
This is the getroute code i use in my program:
So I do use Pointshape in my getroute..
public static RoutingResult GetRoute(ThinkGeo.MapSuite.Core.PointShape startPoint, ThinkGeo.MapSuite.Core.PointShape endPoint)
{
RoutingResult routingResult = new RoutingResult();
try
{
FeatureLayer dkRoadsLayer = Layers.Road.RoadLayer.GetDkRoadsLayer();
dkRoadsLayer.DrawingExceptionMode = DrawingExceptionMode.ThrowException;
dkRoadsLayer.Open();
RtgRoutingSource rtg = new RtgRoutingSource(@"D:\GisData\Export\roads\merged\roads_dk.routable.rtg");
RoutingSource routingSource = rtg;
routingSource.Open();
//var algorithm = new DijkstraRoutingAlgorithm();
var algorithm = new AStarRoutingAlgorithm();
RoutingEngine routingEngine = new RoutingEngine(routingSource, algorithm, dkRoadsLayer.FeatureSource);
routingEngine.RoutingResultsType = RoutingResultsType.RouteSegmentsAndFeatures;
routingResult = routingEngine.GetRoute(startPoint, endPoint);
routingSource.Close();
dkRoadsLayer.Close();
}
catch (Exception ex)
{
doLog.ErrorException(String.Format("Startpoint: {1} *** Endpoint: {2} ***** Ex Message: {0}", ex.Message, startPoint, endPoint), ex);
throw;
}
return routingResult;
}