I am uploading a new version. I made changes to allow it to compile in Delphi
XE2 (see previous issue #13). Most of the changes were just format changes,
but made 3 more changes since my last issue post:
1. Added ResultType to TAddressRec - when you enter an address for Google to
search on, it returns a value indicating how successful it was in matching the
address entered with the addresses it knows about. This is discussed in the
article: https://developers.google.com/maps/documentation/geocoding/.
For example, if you enter Kansas City, MO then the Result Type = 'locality'.
If you enter everything correctly, the ResultType = 'street_address'. But if
you entered, the house number wrong, the ResultType = 'route' to indicate it
found the street but not the exact address.
2. Added a field to DemoGeoCoded to display the ResultType value.
3. The previous code was dividing the latitude and longitude values returned
from Google by 1000000 before saving in the Lat and Lon fields of TAddressRec.
This meant that when passing the Lat and Lon values into GoogleMaps unit you
needed to multiply the values by 1000000 so it would locate the map correctly.
I changed the GeoCoder unit to remove the division by 1000000 so not the Lat
and Lon values saved in TAddressRec are the actual values.
Original issue reported on code.google.com by rlw...@gmail.com on 12 Feb 2013 at 5:14
Original issue reported on code.google.com by
rlw...@gmail.com
on 12 Feb 2013 at 5:14Attachments: