ThinkGeo.com    |     Documentation    |     Premium Support

Add custom road block

Hi Team,

How to add custom road closure in the route driving direction then will choose another route…

Regards,
Tamilarasan.

Hi Tamilarasan,

Please visit our sample here: https://github.com/ThinkGeo/RoutingSample-ForWinForms

And you can find how to implement that in the sample: Routing Around Roadblocks.

Wish that’s helpful.

Regards,

Ethan

Hi Ethan,

Its help . I have one doubt If need route block that time only i raise event like

if (chkIsAvoidArea.Checked)
{
routingEngine.RoutingAlgorithm.FindingRoute += new EventHandler(Algorithm_FindingPath);
}
else
{
routingEngine.RoutingAlgorithm.FindingRoute -= new EventHandler(Algorithm_FindingPath);
}

Otherwise its not required right?..

Regards,
Tamilarasan.

Hi Tamilarasan,

I guess you means whether the event RoutingAlgorithm_FindingRoute is still need to be used if you don’t want to avoid block feature.

From the logic of our sample, it looks yes, the RoutingAlgorithm_FindingRoute event only handle the avoid logic in this sample, so you don’t need it if you don’t need add block points.

Regards,

Ethan