|
Hello,
You can pass up to 100 pushpins in the pushpins property(array) of the mapspecification. Here's the example from the SDK:
'Route between two locations
Dim latLongs(1) As LatLong
latLongs(0) = New LatLong()
latLongs(1) = New LatLong()
latLongs(0).Latitude = 40
latLongs(0).Longitude = -120
latLongs(1).Latitude = 41
latLongs(1).Longitude = -121
Dim myRoute As Route
myRoute = routeService.CalculateSimpleRoute(latLongs, "MapPoint.NA", SegmentPreference.Quickest)
'Get a map of the route and add pushpins to the start and end
Dim myRouteViews(0) As ViewByHeightWidth
myRouteViews(0) = myRoute.Itinerary.View.ByHeightWidth
Dim myPushpins(1) As Pushpin
myPushpins(0) = New Pushpin()
myPushpins(0).IconDataSource = "MapPoint.Icons"
myPushpins(0).IconName = "31"
myPushpins(0).Label = "Start"
myPushpins(0).LatLong = myRoute.Itinerary.Segments(0).Waypoint.Location.La tLong
myPushpins(1) = New Pushpin()
myPushpins(1).IconDataSource = "MapPoint.Icons"
myPushpins(1).IconName = "29"
myPushpins(1).Label = "End"
myPushpins(1).LatLong = myRoute.Itinerary.Segments(1).Waypoint.Location.La tLong
Dim mapSpec As New MapSpecification()
mapSpec.DataSourceName = "MapPoint.NA"
mapSpec.Route = myRoute
mapSpec.Pushpins = myPushpins
mapSpec.Views = myRouteViews
Dim myMaps() As MapImage
myMaps = renderService.GetMap(mapSpec)
Steven Pushee
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2003 Microsoft Corporation. All rights
reserved. |