NotificationDelegate Delegate | |
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Handles a Navigation Notification. See example.
Namespace:
Telogis.GeoBase.Navigation
Assembly:
geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax Remarks Examples
A delegate has the following structure:
private void myNotificationDelegate(object sender, NavigationEvent e)
{
}
The delegate is passed the corresponding
NavigationEvent.
This object may be used to retrieve the target street name, turn direction
and other such information:
private void UpcomingTurn(object sender, NavigationEvent e)
{
Console.WriteLine("Turn into " + e.TargetStreet);
}
Finally, the delegate may be used in conjunction with an event, such as a
BeforeTurnDistanceNotification:
myNavigator.AddNotification(new BeforeTurnDistanceNotification(100, 0, DistanceUnit.METERS, new NotificationDelegate(UpcomingTurn)));
This is a notification that fires no earlier than 100 meters before every turn. The notification,
when fired, will call our UpcomingTurn function and output "Turn into (street name)" to the console.
See Also