Mappoint.Location Name assignment and Route.DrivingTime conversion

Microsoft MapPoint

How do I assign name for Mappoint.Location? I don't want to use Lat & Long
as the location name.

oLoc1 = oMap.GetLocation(dblTermLat, dblTermLong, 0)
oLoc2 = oMap.GetLocation(dblLat, dblLong, 0)



Also, what's the formula to convert Mappoint.Route.DrivingTime from decimal
to minutes and hours?



Thanks a million



Bill
Bill,



Not sure what you mean here - if you want to associate a name to a
location, create a pushpin there?


Take the fractional part, multiply with 60, repeat eventually - same
procedure as for the degrees, minutes and seconds topic. It's not
rocket science you know ...

Gilles [MVP].

(Please reply to the group, not via email)
Gilles;
I created pushpins for the 2 waypoints and use .Note to name them. However,
the Lat & Long of the locations still appear in teh driving instructions
instead of pushpin name:

0.2 mi

Sacramento


Angeles / Redding

240.4 mi towards I-5 / Los Angeles

2.1 mi


mi




mi
Never mind! I user .Name instead and it shows in driving instructions.

BN
Gilles;
I'm sorry but I must have done something wrong here:
The Driving time I got is: 0.045231481
I multiplied it by 60 but I can't get to the 1 hour 5 minutes as indicated
in the map info below.
What am i doing wrong?
Bill


Driving Instructions from BAKERSFIELD (Delta Trading) To test cust - Test
Location 1
From: 35.1800 -119.1482 To: 34.9207 -119.4170
Driving Distance: 38.4 miles Time: 1 hour, 5 minutes
"DrivingTime property
Returns the total driving time for a route. Elapsed time is in
fractional days. For example, one hour equals 1/24 (or .041666).
Returns 0 if a route is not currently calculated. Read-only Double"

The driving time is in fractional days, to get decimal hours, you need
to multiply by 24. In your example, that will yield 1.085555544
decimal hours, or 1 hour and 0.085555544 x 60 = 5.13333264 minutes ...

Gilles [MVP].

(Please reply to the group, not via email)
Thanks Gilles.
This is what I need (stupid me!).

I was trying to use geo constant (goOneMinutes, for instance), and my app
doesn't recognize it. What mappoint references I have to add to get this
work?

Thanks again

Bill
None, just use e.g. GeoTimeConstants.GeoOneMinute.

There's nothing magical about these - they are just the corresponding
unit of time expressed in days to facitilate time zone "size"
specification. GeoOneHour = One hour expressed as days = 1/24.

GeoOneMinute is useful if you want to express the driving time in
minutes (divide by it), but not for hours and minutes.

Gilles [MVP].

(Please reply to the group, not via email)
Thanks Gilles.

You've been my lifesaver!

Bill