Anonymous
03-09-2005, 06:04 AM
Hi All,
I m using Mappoint with C#.I want to disabel the summary of the map when I draw a route.Also I want to display this summary on a button click.
How can I implement this in C#.
Thanxx
Anonymous
03-09-2005, 08:04 AM
Hi,
To hide the summary of your route just use
the ItineraryVisible property in your MapPointControl
MapPointControl1.ItineraryVisible = False
If you create a button, the code is
MapPointControl1.ItineraryVisible = True
You have this example in the Mappoint Help file
I think it is not hard to translate in c#
Sub HideItinerary()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objRoute As MapPoint.Route
'Configure l'application
Set objMap = objApp.ActiveMap
Set objRoute = objMap.ActiveRoute
objApp.Visible = True
objApp.UserControl = True
'Ajoute deux étapes et calcule un itinéraire
objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)
objRoute.Calculate
'Masque maintenant l'itinéraire qui était apparu automatiquement ci-dessus
objApp.ItineraryVisible = False
End Sub
Mohamed