RoutingStrategyLinkEdits Property |
Namespace: Telogis.GeoBase.Routing
To use this feature, create a LinkEditDatabase and create appropriate LinkEdit objects using the CreateLinkEdit method. Once ready, call Compile to create a CompiledLinkEdits object that can be assigned to this property.
Alternatively, a CompiledLinkEdits can be created from a pre-existing LinkEditDatabase file by calling CompiledLinkEdits.Create.
This property can not be used with a GeoStreamRepository.
public MyForm() { InitializeComponent(); // Set up a link edit database, edit the link(s) and compile the edits database... // ...... // Create a link edit database in local memory. Telogis.GeoBase.Routing.LinkEdit.LinkEditDatabase myLinkEditDatabase = new Telogis.GeoBase.Routing.LinkEdit.LinkEditDatabase(); // Then create a link selection. This example specifies a single link. Telogis.GeoBase.Routing.LinkEdit.LatLonSelection myLatLonSelection = new Telogis.GeoBase.Routing.LinkEdit.LatLonSelection(new LatLon(33.632024, -117.815720)); // Then create a link edit. Set the link speed to a maximum of 15MPH. myLinkEditDatabase.CreateLinkEdit(myLatLonSelection, 15, Telogis.GeoBase.SpeedUnit.MilesPerHour); // Compile the link edit database ready to be applied to a routing strategy. Telogis.GeoBase.Routing.LinkEdit.CompiledLinkEdits myCompiledLinksDatabase = myLinkEditDatabase.Compile(); // ..... // Then.... // Create a route and apply the link edit database to its strategy. Telogis.GeoBase.Routing.Route someRoute = new Telogis.GeoBase.Routing.Route(); someRoute.Strategy.LinkEdits = myCompiledLinksDatabase; }