Dynamensions.Google.Maps.Geocoding.Core 2.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Dynamensions.Google.Maps.Geocoding.Core --version 2.2.0                
NuGet\Install-Package Dynamensions.Google.Maps.Geocoding.Core -Version 2.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dynamensions.Google.Maps.Geocoding.Core" Version="2.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dynamensions.Google.Maps.Geocoding.Core --version 2.2.0                
#r "nuget: Dynamensions.Google.Maps.Geocoding.Core, 2.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Dynamensions.Google.Maps.Geocoding.Core as a Cake Addin
#addin nuget:?package=Dynamensions.Google.Maps.Geocoding.Core&version=2.2.0

// Install Dynamensions.Google.Maps.Geocoding.Core as a Cake Tool
#tool nuget:?package=Dynamensions.Google.Maps.Geocoding.Core&version=2.2.0                

Google-Maps-Geocoding-dotnet-API

** .NET wrapper for interaction with Google Maps Geocoding Web Services. Use Google Geocoding and ReverseGeocoding services with the ability to retrieve and query data in JSON, XML or POCO(.NET objects) format

Installation

Source is written and compiled on .NET 4.5 but can be build and used against 4.5.1, 4.5.2 and 4.6

  • From source
    • Clone/download repo, build solution, add references to GoogleMapsGeocoding.dll and Newtonsoft.Json.dll(dependency) in your project
  • Via Nuget

Usage


using GoogleMapsGeocoding;
using GoogleMapsGeocoding.Common;

class Program
{
    static void Main(string[] args)
    {
        // Create new Geocoder and pass GOOGLE_MAPS_API_KEY(in this example it's stored in .config)
        IGeocoder geocoder = new Geocoder(ConfigurationManager.AppSettings["GOOGLE_MAPS_API_KEY"]);
        
        // Get GeocodeResponse C# object from address or from Latitude Longitude(reverse geocoding) 
        GeocodeResponse response =  geocoder.Geocode("1984 west armitage ave chicago il");
        GeocodeResponse reversGeocoderesponse = geocoder.ReverseGeocode(40.714224, -73.961452);

        // You can then query the response to get what you need
        double latitude = response.Results[0].Geometry.Location.Lat;
        string address = reversGeocoderesponse.Results[1].FormattedAddress;

        // ..or you can get a response in JSON, XML string foramt(for whatever reason) and "play" with it
        string responseJson = geocoder.Geocode("1984 west armitage ave chicago il", ResponseFormat.JSON);
        string reverseResponseXml = geocoder.ReverseGeocode(40.714224, -73.961452, ResponseFormat.XML);

        // Then you can deserialize it to C# object again
        GeocodeResponse geocodeFromJson = geocoder.FromJson(responseJson);
        GeocodeResponse reverseGeocodeFromXml = geocoder.FromXml(reverseResponseXml);           
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.2 is compatible.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 614 11/2/2019
2.2.0 442 11/2/2019
2.1.0 478 11/2/2019
2.0.0 464 11/2/2019
1.1.0 489 11/2/2019
1.0.0 455 11/2/2019