Click or drag to resize

NotificationDelegate Delegate

Verizon Connect Logo
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
public delegate void NotificationDelegate(
	Object sender,
	NavigationEvent desc
)

Parameters

sender
Type: SystemObject
The object received from the event handler.
desc
Type: Telogis.GeoBase.NavigationNavigationEvent
The current NavigationEvent.
Remarks
Examples
A delegate has the following structure:
C#
private void myNotificationDelegate(object sender, NavigationEvent e)
{
    // do something useful
}
The delegate is passed the corresponding NavigationEvent. This object may be used to retrieve the target street name, turn direction and other such information:
C#
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:
C#
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