-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3d91280
Showing
66 changed files
with
23,281 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
*.obj | ||
*.pdb | ||
*.user | ||
*.aps | ||
*.pch | ||
*.vspscc | ||
*.vssscc | ||
*_i.c | ||
*_p.c | ||
*.ncb | ||
*.suo | ||
*.tlb | ||
*.tlh | ||
*.bak | ||
*.cache | ||
*.ilk | ||
*.log | ||
*.lib | ||
*.sbr | ||
*.scc | ||
*.tmp | ||
[Bb]in/ | ||
[Dd]ebug/ | ||
obj/ | ||
[Rr]elease/ | ||
[Tt]humbs.db | ||
[Tt]est[Rr]esult* | ||
[Bb]uild[Ll]og.* | ||
*.[Pp]ublish.xml | ||
*.log.* | ||
[Ll]ogs/ | ||
[Dd]ata/ | ||
[Pp]ackages/ | ||
*nlog*.csv | ||
nlog-404s.csv | ||
imagecache/ | ||
[Aa]ssemblies/ | ||
[Rr]aven/ | ||
.vs/ | ||
|
||
# Windows Azure | ||
csx/ | ||
rcf/ | ||
|
||
# Windows Azure Publish Settings contain security keys for accessing your Windows Azure account | ||
.publishsettings | ||
|
||
# Resharper Ignores | ||
_ReSharper.*/ | ||
*.resharper.user | ||
|
||
.sass-cache/ | ||
|
||
# Ignore build stuff | ||
[Bb]uild/Artifacts/ | ||
[Ss]cripts-[Bb]uild/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2013 Pure Krome | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Spatial Utilities for .NET applications | ||
|
||
[![Build status](https://ci.appveyor.com/api/projects/status/ooqkpqtsyy2vuor1?svg=true)](https://ci.appveyor.com/project/PureKrome/simplegooglewebservices) [![NuGet Badge](https://buildstats.info/nuget/WorldDomination.SimpleGoogleWebServices)](https://www.nuget.org/packages/WorldDomination.SimpleGoogleWebServices/) [![MyGet Badge](https://buildstats.info/myget/pk-development/WorldDomination.SimpleGoogleWebServices)](https://www.myget.org/feed/pk-development/package/nuget/WorldDomination.SimpleGoogleWebServices) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)]() | ||
|
||
This library contains various some simple .NET wrapper code over some google webservices. | ||
|
||
Currently, it's wrapping code over some maps/places webservices. | ||
|
||
NOTE: _This simple library is **not** intended to replace official Google .NET SDK's. It's only to simplfiy calling some of their simple endpoints._ | ||
|
||
- `GeocodeAsync` : convert an address into a Latitude/Longitude. | ||
- `AutocompleteAsync` : convert a query into a list of possible addresses. | ||
- `DetailsAsync` : convert a Google PlaceId into a nicely Address object. | ||
- `CleanUpAddressAsync` : convert an address's abbreviations all into long format. e.g. St. (for street) -> Street. NOTE: This calls `Autocomplete` and then `Details`. | ||
|
||
# TODO - clean this up. | ||
|
||
### GeocodeAsync | ||
Given an query/address, this get's the Latitude and Longitude of the location. | ||
|
||
// Arrange. | ||
var service = new GoogleMapsApiService(yourGoogleMapsApiKey, null || mockHttpClient); | ||
|
||
// Act. | ||
var result = await service.GeocodeAsync("Bondi Beach, Sydney, Australia"); | ||
|
||
// Now you can access: | ||
// result.Address | ||
// result.Coordinate.Latitude | ||
// result.Coordinate.Longitude | ||
|
||
Remarks: Learn what [geocoding is on Wikipedia(http://en.wikipedia.org/wiki/Geocoding). | ||
|
||
### AutocompleteAsync | ||
Given a query lets see what possible address locations might be available. | ||
NOTE: `PlaceId` is a specific, unique Google Id to identify the result location. | ||
|
||
// Arrange. | ||
var service = new GooglePlacesApiService(yourGoogleMapsApiKey, null || mockHttpClient); | ||
|
||
// Act. | ||
var result = await service.AutocompleteAsync("Bondi Beach, Sydney, Australia"); | ||
|
||
// Now you can access: | ||
// result.Address.PlaceId | ||
// result.Address.Location | ||
|
||
|
||
### DetailsAsync | ||
Given a (Google) PlaceId, return the sepcific, verbose Address information for that location. | ||
|
||
// Arrange. | ||
var service = new GooglePlacesApiService(yourGoogleMapsApiKey, null || mockHttpClient); | ||
|
||
// Act. | ||
var result = await service.DetailsAsync("1234ABCD..."); | ||
|
||
// Now you can access: | ||
// result.Address.StreetNumber | ||
// result.Address.Street | ||
// result.Address.Suburb | ||
// result.Address.City | ||
// result.Address.State | ||
// result.Address.Country | ||
// result.Address.Postcode | ||
|
||
|
||
### CleanUpAddressAsync | ||
Given an exact address (because we don't know the `PlaceId`) get the details for the (expected) found location.<br/> | ||
*Note:* This first calls `AutocompleteAsync` and if we have 1 result exactly, then calls `DetailsASync` and extracts the long form address components. | ||
|
||
|
||
// Arrange. | ||
var service = new GooglePlacesApiService(yourGoogleMapsApiKey, null || mockHttpClient); | ||
|
||
// Act. | ||
var result = await service.CleanUpAsync("1 Bondi Beach, Sydney, Australia"); | ||
|
||
// Now you can access: | ||
// result.Address.StreetNumber | ||
// result.Address.Street | ||
// result.Address.Suburb | ||
// result.Address.City | ||
// result.Address.State | ||
// result.Address.Country | ||
// result.Address.Postcode | ||
|
||
|
||
License: this code is licensed under MIT. | ||
-- end of file -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26430.14 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleGoogleWebServices", "src\SimpleGoogleWebServices\SimpleGoogleWebServices.csproj", "{09316F80-03EA-4405-A745-21E7FD5E9854}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleGoogleWebServices.Tests", "tests\SimpleGoogleWebServices.Tests\SimpleGoogleWebServices.Tests.csproj", "{E203332A-1125-476B-A749-1EAB82F667DE}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleGoogleWebServices.WebApplication", "src\SimpleGoogleWebServices.WebApplication\SimpleGoogleWebServices.WebApplication.csproj", "{44A8E6C8-4167-4871-86D4-D89004954DA5}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{09316F80-03EA-4405-A745-21E7FD5E9854}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{09316F80-03EA-4405-A745-21E7FD5E9854}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{09316F80-03EA-4405-A745-21E7FD5E9854}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{09316F80-03EA-4405-A745-21E7FD5E9854}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{E203332A-1125-476B-A749-1EAB82F667DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{E203332A-1125-476B-A749-1EAB82F667DE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{E203332A-1125-476B-A749-1EAB82F667DE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{E203332A-1125-476B-A749-1EAB82F667DE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{44A8E6C8-4167-4871-86D4-D89004954DA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{44A8E6C8-4167-4871-86D4-D89004954DA5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{44A8E6C8-4167-4871-86D4-D89004954DA5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{44A8E6C8-4167-4871-86D4-D89004954DA5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.