PDA

View Full Version : Error when trying to add Waypoints



rowter
09-14-2009, 04:31 PM
Hi,

I need to add waypoints to the route and then calculate the route.

Is this the correct format to ad waypoint? I am gettign error on this line.
objmap.activeroute.waypoint.add("1 Microsoft Way, Redmond, WA, 12345")

Error reads: Parameter is incorrect


Thanks in advance

Winwaed
09-14-2009, 04:51 PM
Yup!

The Add method requires a Location object not a text name. (there is an optional text parameter which gives the NAME - this is a label, and not the actual place.).

You can create a Location object from an address, partial address, or place name using one of the Map object's "Find" methods (there are a few according to whether it is a street address or general search).


Richard

rowter
09-15-2009, 11:47 AM
Thanks Richard,

It is working now.