LinkEditDatabaseCreateLinkEdit Method |
Namespace: Telogis.GeoBase.Routing.LinkEdit
When applied, speeds will be converted into miles per hour and rounded down to the largest integer value that is no larger than the specified speed. A negative speed can be applied, and indicates that the original speed from strategy's RoutingProfile will be used. The maximum speed that can be specified is 254mph.
If the returned LinkEdit object is changed, the change will only be applied to the database if UpdateLinkEdit is called.
public MyForm() { InitializeComponent(); // 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); // Next, compile the database using the LinkEditDatabase.Compile method, ready to // be applied to a route strategy... }