Community of VE/MapPoint Users and Developers
This is a discussion on Displaying a label with each pushpin within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Greetings, I'm having a hard time getting any label to display with a pushpin. I CAN get the baloons to ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Displaying a label with each pushpin I'm having a hard time getting any label to display with a pushpin. I CAN get the baloons to display, but those have a Windows Close box on them. And I find it annoying for MapPoint to serially number each pushpin, 1,2,3, and on. Is there a way to override this automatic behavior and for me to define what the label will say? Thanks. |
| |||
|
Hi, Can you please explain what exacly the problem is ? I do not understeand (my native language is not english), but in my balloons it displayes exacly what I want. I do not understeand the eniummeration you tell us. If you have trouble with the 'x' button to close the balloons then you can eventually redesplay them if a positsion is upgraded. but you have to tell wht you wants.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Balloons will be good enough
Hi, I was trying to find a different way to display test about a pushpin location, but I decided the balloons will work for me. They are easy to work with and will dispay what I want. The real problem I have is that when I display a route, MapPoint displays the waypoints, which are problematic for me. I use the same base station (a pizza shop) as the start and end point for lots of routes (pizza delivery runs), which means that MapPoint will need to draw each waypoint number associated with the base station. You know how MP draws the waypoints if the driver departs the base, makes two deliveries, and comes home again? The base station gets a waypoint of 1 AND 4. If I have three delivery runs to show at the same time, and if one run is a single, one run is a double, and another run is a triple, the base station will have waypoints numbered 1,3,4,5, which is very confusing for someone to look at. I'd rather suppress waypoing labels, but don't know how. Anybody know how to suppress it? Thanks, Bob |
| |||
|
Hi, I think the idea is not to delete the waypoint numbers ( I think it is not possible ), but to REORDER them programmatically. The other idea is to delete the Route after each calculation and let a pushPin or Text in each Waypoint. For the first idea, you can see this example and see how to do it. Code:
Sub ReorderSecondStop()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objRoute As MapPoint.Route
'Set up the application
Set objMap = objApp.ActiveMap
Set objRoute = objMap.ActiveRoute
objApp.Visible = True
objApp.UserControl = True
'Add two waypoints
objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)
'Make second waypoint the start point
objRoute.Waypoints.Item(2).Reorder geoMoveToTop
' The other values are // See the help file for more explanations
' geoMoveDown, 3
' geoMoveToBottom 1
' geoMoveToTop 0
' geoMoveUp 2
End Sub
Regards |
| |||
| The following code is run from EXCEL and creates a map from columns in a spreadsheet. As below. I would like to take the second column Drop Number (strloca) and put it in the label ahead of the address line. Only the address shows up there. I haven’t been able to get this to work. I think it’s in the add waypoint function that I need to do this. Do you have any suggestions ? Regards Mark ![]() ![]() Dim oApp As MapPoint.Application Private Sub CommandButton1_Click() On Error Resume Next Dim strLoc As String Dim strLoca As String Dim strLocb As String Dim strLocd As String Dim strLoc1 As String Dim strLoc2 As String Dim strLoc3 As String Dim rowptr As Integer rowptr = 1 Set oApp = CreateObject("MapPoint.Application.NA.13") oApp.Visible = True Set objMap = oApp.NewMap() 'code goes here to add to route Dim objRoute As MapPoint.Route Set objRoute = objMap.ActiveRoute ' get data from row in excel Do strLoc0 = Worksheets("Sheet1").Cells(rowptr, 1) strLoca = Worksheets("Sheet1").Cells(rowptr, 2) strLocb = Worksheets("Sheet1").Cells(rowptr, 4) strLoc1 = Worksheets("Sheet1").Cells(rowptr, 5) strLoc2 = Worksheets("Sheet1").Cells(rowptr, 6) strLoc3 = Worksheets("Sheet1").Cells(rowptr, 7) If (strLoc0 <> “”) Then ' skip header row If (strLoc0 <> "Route key") Then ' concatenate data into a string if there is data strLoc = strLoc1 + "," & strLoc2 + "," & strLoc3 ' concatenate drop and Name for pushpin strLocd = strLoca + "," & strLocb objRoute.Waypoints.Add objMap.FindResults(strLoc).Item(1) 'add pushpin Set objLoc = objMap.FindAddressResults( _ Worksheets("Sheet1").Cells(rowptr, 5), _ Worksheets("Sheet1").Cells(rowptr, 6), _ Worksheets("Sheet1").Cells(rowptr, 7))(1) objMap.AddPushpin objLoc, strLocd End If End If rowptr = rowptr + 1 Loop While (strLoc0 <> “”) objRoute.Calculate 'Zoom to the route End Sub |
| |||
| Re: Displaying a label with each pushpin
Hi, I'm not sure I understeand what you mean. Do you wants to give a name to a waypoint that it has to display ? Then this is how you do: Code: objRoute.Waypoints.Add(location, name) Can you next time put your code into [ code] [ /code] tags (without the spaces) please ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| displaying, label, pushpin |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Label Waypoints | MD2000 | MapPoint 2006/2009 Discussion | 10 | 11-07-2006 03:57 AM |
| Displaying a Tool Tip when hovering over a pushpin | BobFromBoston | MapPoint 2006/2009 Discussion | 4 | 03-18-2006 04:17 AM |
| Displaying Balloon on Pushpin | Anonymous | MapPoint 2006/2009 Discussion | 11 | 01-31-2005 03:53 PM |
| Working with Baloons & Name (label) | Anonymous | Wish List | 2 | 11-26-2002 06:07 AM |
| specify label to all the objects of a layer | Anonymous | Wish List | 0 | 08-28-2002 08:22 AM |