c# - Using Google maps API to Generate valid Addresses? -


i creating desktop c# application create test files, problem files need have valid addresses. there way can use 1 of google maps apis valid address put file create?

you use google geocoder api pass addresses , receive data on location, such lat&long coordinates, specific address details, etc... data can validate if lets want limit addresses country or city. downside there limited requests day, should sufficient.

the api extensive provide links below idea of it.

documentation: https://developers.google.com/maps/documentation/geocoding/
example: https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple
another example: http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html

edit: article on address validation using geocoding: http://blog.mgm-tp.com/2011/08/address-validation-with-geocoding/
edit 2:here stackoverflow article on same topic: address validation using google maps api

an example response following:

{    "results" : [       {          "address_components" : [             {                "long_name" : "winnetka",                "short_name" : "winnetka",                "types" : [ "locality", "political" ]             },             {                "long_name" : "new trier",                "short_name" : "new trier",                "types" : [ "administrative_area_level_3", "political" ]             },             {                "long_name" : "cook county",                "short_name" : "cook county",                "types" : [ "administrative_area_level_2", "political" ]             },             {                "long_name" : "illinois",                "short_name" : "il",                "types" : [ "administrative_area_level_1", "political" ]             },             {                "long_name" : "united states",                "short_name" : "us",                "types" : [ "country", "political" ]             }          ],          "formatted_address" : "winnetka, il, usa",          "geometry" : {             "bounds" : {                "northeast" : {                   "lat" : 42.1282269,                   "lng" : -87.7108162                },                "southwest" : {                   "lat" : 42.0886089,                   "lng" : -87.7708629                }             },             "location" : {                "lat" : 42.10808340000001,                "lng" : -87.735895             },             "location_type" : "approximate",             "viewport" : {                "northeast" : {                   "lat" : 42.1282269,                   "lng" : -87.7108162                },                "southwest" : {                   "lat" : 42.0886089,                   "lng" : -87.7708629                }             }          },          "place_id" : "chijw8va5tned4gry91ng47qy3q",          "types" : [ "locality", "political" ]       }    ],    "status" : "ok" }  

Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -