diff --git a/api/admin/_scripts/geocode.cfm b/api/admin/_scripts/geocode.cfm index 77aa952..f1128cf 100644 --- a/api/admin/_scripts/geocode.cfm +++ b/api/admin/_scripts/geocode.cfm @@ -39,8 +39,8 @@ - UPDATE Addresses SET Lat = , - Lng = + UPDATE Addresses SET Latitude = , + Longitude = WHERE ID =
Geocoded Address ID #addressId#: #geo.lat#, #geo.lng#
@@ -54,7 +54,7 @@ SELECT ID, Line1, Line2, City, ZIPCode FROM Addresses - WHERE (Lat IS NULL OR Lat = 0) + WHERE (Latitude IS NULL OR Latitude = 0) AND Line1 IS NOT NULL AND Line1 != '' @@ -64,8 +64,8 @@ - UPDATE Addresses SET Lat = , - Lng = + UPDATE Addresses SET Latitude = , + Longitude = WHERE ID = @@ -86,8 +86,8 @@ a.Line2, a.City, a.ZIPCode, - a.Lat AS Latitude, - a.Lng AS Longitude + a.Latitude, + a.Longitude FROM Businesses b LEFT JOIN Addresses a ON b.AddressID = a.ID ORDER BY b.Name diff --git a/api/inc/geocode.cfm b/api/inc/geocode.cfm index a453ee6..520627c 100644 --- a/api/inc/geocode.cfm +++ b/api/inc/geocode.cfm @@ -47,7 +47,7 @@ function geocodeAddressById(addressId) { if (geo.success) { queryExecute(" - UPDATE Addresses SET Lat = :lat, Lng = :lng WHERE ID = :id + UPDATE Addresses SET Latitude = :lat, Longitude = :lng WHERE ID = :id ", { lat: { value: geo.lat, cfsqltype: "cf_sql_decimal" }, lng: { value: geo.lng, cfsqltype: "cf_sql_decimal" },