starbuck
11-11-2003, 08:31 AM
Hi All
Is it possible to get the address from -
loc.Waypoints.Item(1).Name
and place it into MapPoint.Location property
Thanks in advance for any advice
John Meyer
11-12-2003, 08:22 AM
Not sure what you are trying to do but a Waypoints.Item has a location property
starbuck
11-14-2003, 04:58 AM
How did I miss that, thanks John
starbuck
11-17-2003, 08:18 AM
Still stuck here, probably missing somthing very simple but here goes.
Dim loc As MapPointCtl.Route
loc.Waypoints.Item(1).Name ' returns the waypoint name correctly
but how do I get/convert the full address from - loc.Waypoints.Item(1).Location etc
Thanks in advance for any advice.
John Meyer
11-17-2003, 08:25 AM
What are you trying to do with the location object? What is the desired end result?
starbuck
11-17-2003, 08:41 AM
Hi John
I want to put the address of the waypoint, street, city etc in the address fields of a new job.
waypoint 1 being start of job
waypoint 2 being end of job
John Meyer
11-17-2003, 09:32 AM
The location object has a streetaddress property IF the location represents an address. See the help file: Objects | Location Object | Streetaddress
StreetAddress property
Returns the StreetAddress object for the specified location. Returns "Nothing" if the location does not represent an address. Read-only.
Applies to
Objects: Location
There is an article that describes how to search for the nearest address from a point. You could use this if your waypoint does not have an address.
Reverse Geocoding, Pt. III by Walt Cygan
http://www.mp2kmag.com/a50--reverse.geocoding.3.mappoint.html