Coder Social home page Coder Social logo

geocodesharp's Introduction

GeocodeSharp

An async .NET client for the Google geocode API

The object model closely follows the model documented here.

##Example

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;
    // ...
}

geocodesharp's People

Contributors

bcuff avatar chester89 avatar dashue avatar felipeleusin avatar marcocasamento avatar oobayly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

geocodesharp's Issues

Add support for System.Text.Json attributes

When the results are serialized using System.Text.Json, the property names aren't mapped back to the Google property names.

A solution would be to add in a System.Text.Json.Serialization.JsonPropertyNameAttribute for all the properties along side the Newtonsoft.Json.JsonPropertyAttribute.

Would this be something that could be included? If so, I'll get a PR put together.

Using a proxy

Given that 2500 req/day is a free limit, I'm thinking about using a proxy for this library. I personally have multiple projects that utilize Geocoding API, and daily volumes will only increase from this point forward.
Unfortunately, proxy usage can vary by server implementation.
Would you be open to a slight refactoring - introducing something like IRequestExecutor with default implementation being current logic, but so we can plug in any other technique (sending requests through nginx, for example)? I would volunteer for this, of course.

Reverse Geocoding

Something more like suggestion.

Because result of reverse geocoding (Address Lookup) is same as geocoding (Latitude/Longitude Lookup) I suggest adding method also for this thing. At first look base difference is change of parameter in URL from "address" to "latlng" and some optional parameters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.