-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.txt
23 lines (18 loc) · 886 Bytes
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
USAGE:
- Find lat/long from address:
string address = "1600 Amphitheatre Parkway, Mountain View, CA 94043";
Coordinate coordinate = new GoogleGeocoder().GetLatLongFromAddress(address);
- Find address from lat/long:
Coordinate origin = new Coordinate { Latitude = 37.4217429, Longitude = -122.0844308 };
string address = new GoogleGeocoder().GetAddressFromLatLong(origin.Latitude, origin.Longitude)
- Get directions between two addresses
string origin = "1600 Amphitheatre Parkway, Mountain View, CA 94043";
string destination = "1701 Airport Blvd San Jose, CA 95110";
Directions directions = new GoogleGeocoder().GetDirections(origin, destination, TravelMode.Walking);
string totalDistance = directions.Distance;
string totalDuration = directions.Duration;
foreach (DirectionStep step in directions.Steps)
{
// step.Instruction
// step.Duration
}