SkillAgentSearch skills...

Geocoder

C# wrapper for geocoding services (currently supports only Google Maps API with plans for Bing support soon). Includes geocoding, reverse geocoding and driving directions.

Install / Use

/learn @scottschluer/Geocoder
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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 }

Related Skills

View on GitHub
GitHub Stars10
CategoryCustomer
Updated1y ago
Forks2

Languages

C#

Security Score

75/100

Audited on Apr 9, 2024

No findings