Google Maps v3 geocoding server-side

I am not sure if I understand you correctly but this is the way I do it (if you are interested)

void GoogleGeoCode(string address)
{
    string url = "http://maps.googleapis.com/maps/api/geocode/json?sensor=true&address=";

    dynamic googleResults = new Uri(url + address).GetDynamicJsonObject();
    foreach (var result in googleResults.results)
    {
        Console.WriteLine("[" + result.geometry.location.lat + "," + result.geometry.location.lng + "] " + result.formatted_address);
    }
}

using the extension methods here & Json.Net

Leave a Comment