my Linkedin: http://cn.linkedin.com/in/jebberwocky  ,email: jebberwocky@gmail.com

We not only open our code, also the mind. 
 
Nuget:
You can install from Nuget now!
  • Google Geocoder Kit –https://nuget.org/packages/GglGeo
  • Static Google Maps Kit –https://nuget.org/packages/GglMap
  • Static Google Maps WinForm Control – https://nuget.org/packages/GglWinMap
Notice:
 
Hello all, if you are familar with Unit Testing in C# or like to learn about it, join us contact: jebberwocky@gmail.com

Project Description
 
It is a sub-project divided from Citiport project, divided into following
 
  • Google Geocoder Kit – implementation for “Google Geocoding API” in C#
  • Static Google Maps Kit – implementation for “Static Google Maps API” in C#
  • Google Places Kit - implementation for "Google Places API" in C#
  • Static Google Maps WinForm Control – .NET WinForm control

 


Google Geo Kit Demo

including demonstration of how to do geocoding, reverse geocoding, handling click, mouse-over, mouse-out event in Windows Google Map component. Also includes Google Places API

download

view source

 


Google Geocoder Kit

SpotInfo sinfo = new SpotInfo();
sinfo.Address = "1600+Amphitheatre+Parkway,+Mountain+View,+CA";
Geocoder geo = new Geocoder();
GeoResult result = geo.GetGeoResult(sinfo);
if (GeoResultStatus.OK.Equals(result.Status))//@since 0.1.1
{
foreach (GeoObj obj in result.Results)
{
Response.Write(obj.FormattedAddress + "<br>");
}
}
GeoResult Object
public class GeoObj
{
public class AddressComponent
{
public String ShortName { set; get; }
public String LongName { set; get; }
public List<String> Types { set; get; }
}

public class GeometryClass
{
public SpotLatLng Location { set; get; }
public String LocationType { set; get; }
public SpotLatLng ViewPortSW { set; get; }
public SpotLatLng ViewPortNE { set; get; }
}

public String FormattedAddress { get; set; }
public List<String> Types { set; get; }
public GeometryClass Geometry { set; get; }
public List<AddressComponent> AddressComponents { set; get; }
}

public class GeoResult
{
public GeoResultStatus Status;
public List<GeoObj> Results { get; set; }

public static GeoResult NotDefinedResult = new GeoResult();
public static GeoResult BlankResult = new GeoResult();
}
In Java

dependency 
  • Json-simple-1.1.jar
GeoInfo info = new GeoInfo();
info.setLatlng(new GeoLatLng(37.4219720, -122.0841430));
Geocoder gcoder = new Geocoder();
GeoResult gresult = gcoder.get(info);
Iterator itr = gresult.getResults().iterator();
while(itr.hasNext()){
GeoObj obj = (GeoObj)itr.next();
response.getWriter().append(obj.getFormattedAddress());
}
Documentation
Thanks for Mika Tuupola for a great php implementation for static google maps

Used in

  • VisualClues - a visual recognizing application for defining objects from video stream video life or images, used by few police departments in China. Google Geo Kit is used for visualize the camera location to analysis the path.
  • CitiPad - used for Geocoding in proxy server to reduce the iPad loading.
For any question or suggestion, contact jebberwocky@gmail.com or leave message in "Discussions" :)

Last edited Oct 2, 2012 at 4:31 AM by jebberwocky, version 73