BobFromBoston
04-19-2006, 03:38 PM
Hi,
Is there a way to override the image MapPoint (ActiveX) assigns to a WayPoint? I get the start of the route assigned the number "1" in a box, and each subsequent WayPoint on the route is given a number inside a box. Is there a way around this? Can I change the image or suppress the box entirely?
Thanks for the help. I hope it's possible. This yellow square has been bugging me since I started using MapPoint.
Thanks,
Bob
JacquesLebrun
04-20-2006, 09:11 AM
To display your waypoint, I assume you actually insert a pushpin?
You may change the default pushpin symbol:
Set ObjPin = ObjMap.AddPushpin(ObjLoc, "123")
ObjPin.symbol = 62
You may also design you own symbols in a bitmap that would include your number and then insert this bitmap instead of the pushpin:
Set ObjPin = ObjMap.AddPushpin(ObjLoc, "123")
Set ObjSym = ObjMap.Symbols.Add("marker123.bmp")
ObjPin.Symbol = ObjSym.ID
Set ObjSym = Nothing
Of course, your program could load an empty marker in a picture, overlay the number "123", save the image as "marker123.bmp", so you could dynamically show a marker with any number without having to manually define thousands of bitmaps.
BobFromBoston
04-20-2006, 09:33 PM
I tried your code, but find that MapPoint automatically places a square on every waypoint, regardless of the pushpin associated with the location. And this exactly matches the way the MapPoint program treats waypoints of a route I create with it. So I am abandoning this method in favor of one which has more promise.
I now think my best bet is to add the waypoints to the route, calculate the route, store the invidiual legs of the journey, then delete the route. If I then add each leg of the journey myself, and add pushpins where the waypoints were, I can rebuild the image I desire.
Is it difficult to load the individual legs into an array, then create my own route?
Thanks for any suggestions. I've been hoping for a long time to have more control over drawing the route, anyway.
Thanks,
Bob