I wond开发者_Go百科er if there is a possibility to display window that the way is calculating (exactly the same one that is display in MapPoint 2010 application), with possibility of cancel this calculation (as calculating of optimized route lasts very long)? If so, in which way I can do that?
You could create your own progress form that runs on its own thread. This is what I do with my MapPoint add-in products when they have a larger amount of work to process.
However, you are not going to be able to cancel the Optimize function. MapPoint's COM interface is not multi-threaded. There are no cancel operations. To kill an optimize, you are going to have to kill the application (almost certainly at the OS level) and then restart it.
Optimize is going to take a long time if there are a lot of waypoints (as expected: classic travelling salesman NP-complete problem). Long distances also appear to have a signifcant effect on runtimes.
精彩评论