https://github.com/bcuff/geocodesharp
An async .NET client for the Google geocode API
https://github.com/bcuff/geocodesharp
c-sharp geocode google-geocoder
Last synced: about 1 year ago
JSON representation
An async .NET client for the Google geocode API
- Host: GitHub
- URL: https://github.com/bcuff/geocodesharp
- Owner: bcuff
- License: apache-2.0
- Created: 2014-02-05T18:56:04.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-07-09T21:16:43.000Z (almost 2 years ago)
- Last Synced: 2025-04-12T04:00:00.291Z (about 1 year ago)
- Topics: c-sharp, geocode, google-geocoder
- Language: C#
- Size: 75.2 KB
- Stars: 10
- Watchers: 3
- Forks: 19
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GeocodeSharp
============
An async .NET client for the Google geocode API
The object model closely follows the model [documented here](https://developers.google.com/maps/documentation/geocoding/#GeocodingResponses).
##Example
```c#
using System;
using System.Linq;
using System.Threading.Tasks;
using GeocodeSharp.Google;
var address = "21 Henrietta St, Bristol, UK";
var client = new GeocodeClient();
var response = await client.GeocodeAddress(address);
if (response.Status == GeocodeStatus.Ok)
{
var firstResult = response.Results.First();
var location = firstResult.Geometry.Location;
var lat = location.Latitude;
var lng = location.Longitude;
// ...
}
```