To get address coordinates
-
Wednesday, May 30, 2012 7:35 AM
How to I can to get address's coordinates?
I'm using the API http://dev.virtualearth.net/REST/v1/Locations?o=xml&q=via giuseppe mazzini 4,roma,it&key=mykey but it return more result.
Regards
All Replies
-
Wednesday, May 30, 2012 7:54 AMOwnerThere are 4 addresses that are very similar to that query. Pick the one you are looking for and use those coordinates.
http://rbrundritt.wordpress.com
-
Wednesday, May 30, 2012 8:32 AMOk, but if I specific an address with street number, city and state, why return it more result?
-
Wednesday, May 30, 2012 11:58 AMOwnerIn the example you provided the main difference between the results is the postal code. The street number, city, and state are all the same.
http://rbrundritt.wordpress.com
-
Wednesday, May 30, 2012 12:29 PM
In the example you provided the main difference between the results is the postal code. The street number, city, and state are all the same
And it is no small thing.
I will post a new example even clearer:
dev.virtualearth.net/REST/v1/Locations?o=xml&addressline=via milano&Locality=roma&countryregion=italia&key=mykey
I set the locality to Rome,whereas the result also return other locality.
- Edited by Cracken66 Wednesday, May 30, 2012 12:32 PM
-
Wednesday, May 30, 2012 1:46 PMOwnerIt that example the addresses being returned are still int he greater Rome area. This is simialar to London England where the city of London is only 1 sq km but the greater london area is much larger. Also, when geocoding in italian you should set the culture in your request. i.e. &c=it
http://rbrundritt.wordpress.com
-
Wednesday, May 30, 2012 4:47 PM
What should I do to get the coordinates of "Via Milano 60 Rome Italy"?
Thanks
-
Thursday, May 31, 2012 3:55 PMOwner
That address geocodes fine. Here is a sample URL:
http://dev.virtualearth.net/REST/v1/Locations?o=xml&q=ViaMilano 60, Rome, Italy&c=it&key=mykey
http://rbrundritt.wordpress.com
-
Friday, June 01, 2012 7:39 AM
It is not valid for Viale giuseppe mazzini 4,rome,italy.
Look this:
http://maps.googleapis.com/maps/api/geocode/xml?address=viale%20giuseppe%20mazzini%204,roma,it&sensor=false
Thanks for your help
-
Friday, June 01, 2012 8:19 AMOwnerThat address works fine with the same URL format as well.
http://rbrundritt.wordpress.com
-
Friday, June 01, 2012 9:55 AM
But it return two results, while it should return only one.
-
Friday, June 01, 2012 11:30 AMOwner
and both results are extremely closely matched to your address query. The first one is slightly more accurate, thus the reason why it shows up first. This is normal.http://rbrundritt.wordpress.com
- Marked As Answer by Cracken66 Saturday, June 02, 2012 9:00 AM
-
Friday, June 01, 2012 11:52 AMSo, it is normal that if I search an unambiguous address, the service could to return more results in different localities too.
Ok, thank you very much for your patience.

