Author

Topic: Google maps on check out to determine customer location (Read 656 times)

hero member
Activity: 699
Merit: 501
Seems like this wouldn't be 100% accurate all the time. Seems better to just request the user's address lol. How are you gonna know specifically which house they are at? Wouldn't the location only be an approximation?

Not to mention multi-family dwellings, it can't tell which apartment number, or if you're in an apartment building complex within a street address number range, like 2000-2500 Broadway. I'd say it's only useful as specific as split directional streets like North Broadway vs South Broadway if the customer forgets to put the directional, or gross numerical errors like the customer is at 350 Broadway but they put 3500. Also, you'd have to put in an override for "this is a gift, ship directly to recipient" so the GPS is ignored.

The purpose would be to fill-in most of the address for the user [...] We needed to stick to a strict format because two or more users could write the same address, for different houses in the same street, two or more different ways and it would still lead to the same location. Since we used the data for mapping-out locations on our map, which is also used by our wallet, app, shopping, exchanges and SMS services for authentication, it meant every address must follow a special format [...] Address name, postcode, locality, street, administrative level 1 (up to administrative level 5) country name, ISO code, and longitude & latitude.
As you can see, this is a pritty large amount of data to easily input, edit and get correct, for each user (especially the coordinates) which would obviously cause stressfulness to our users [...] The part which is normally incorrect, as you've pointed out (which is also visible on the script above) is the house number. All the user has to do, after clicking a button, would be to check if the No. Is correct. If it's not, they can simple adjust it (which is also visible if you tried the test) [...]

Since every address or coordinate is processed by Google, it would be as simple as finding an address using their map I.e. it would be able to correct 'typos,' and detect the correct house and No. 99% of the time [...]
The only time our testers had to change their No, was when they used a wireless connection, this meant they simply had to change their house No. to complete the process. This method allowed us to add a 1 or 2 step system (click and check house No.) which would obtain users address components using a strict format that is followed by everyone.

You can read more about geocoding, and reverse geocoding, which our systems use, here and here
legendary
Activity: 3038
Merit: 1032
RIP Mommy
Seems like this wouldn't be 100% accurate all the time. Seems better to just request the user's address lol. How are you gonna know specifically which house they are at? Wouldn't the location only be an approximation?

Not to mention multi-family dwellings, it can't tell which apartment number, or if you're in an apartment building complex within a street address number range, like 2000-2500 Broadway. I'd say it's only useful as specific as split directional streets like North Broadway vs South Broadway if the customer forgets to put the directional, or gross numerical errors like the customer is at 350 Broadway but they put 3500. Also, you'd have to put in an override for "this is a gift, ship directly to recipient" so the GPS is ignored.
legendary
Activity: 1736
Merit: 1023
Seems like this wouldn't be 100% accurate all the time. Seems better to just request the user's address lol. How are you gonna know specifically which house they are at? Wouldn't the location only be an approximation?
hero member
Activity: 699
Merit: 501
Locations are based on Ip addresses and ip addresses may be different because people use vpn or proxies . How are you guys integrating google maps to track them up accurately ? Well this is a nice idea by the way .

Well Google, kindly collects massive amounts of geodata, physically,  which span over a period of years. With the use of geolocation, we can use the MAC address and siganl, which were all gathered by Google, to accurately locate a user as close as street levels. Normally we were limited to City level when using IP address for tracking, but with the use of MAC address well [...]
In addition, since we're using GPS to determine the location, the results are not impacted on, no matter how the user accesses the website I.e. using proxy or vpn unlike IP-based geolocation methods [...]
full member
Activity: 196
Merit: 100
Locations are based on Ip addresses and ip addresses may be different because people use vpn or proxies . How are you guys integrating google maps to track them up accurately ? Well this is a nice idea by the way .
full member
Activity: 145
Merit: 100
Hi- Thanks,

Do you mean the example is on the "settings" of your platform?


That's correct. Copy, paste and adjust this code to meet your demands. It's all you need.


Download and insert the script /js/helpers/gmaps.min.js to your site


Quote
function loadLocationWrong() {    buttonWrong.style.visibility = 'hidden';    retry.style.visibility = 'visible';    //.removeAttribute("readonly");     if (address.value != '') {        address.removeAttribute("readonly");    }    if (city.value != '') {        city.removeAttribute("readonly");    }    if (region.value != '') {        region.removeAttribute("readonly");    }    if (country.value != '') {        country.removeAttribute("readonly");    }    //enable other button... location-text-address-retry   // $("location-text-address").attr("readonly", false);} function loadLocation() {     //location-text-state-city    //location-text-country      buttonWrong.style.visibility = 'visible';     if (navigator.geolocation) {         var iscoords = true;        navigator.geolocation.getCurrentPosition(function(position){            loadPosition(position, true);        });      } else {    //ask to upgrade browser.    }  } function loadPosition(position, iscoords) {     if (iscoords === true) {        geocoder.geocode({ 'address': position.coords.latitude + "," + position.coords.longitude }, function (data, status) {             sortAddress(data);         });    } else if (iscoords === false) {         retry.style.visibility = 'hidden';        address.readOnly = true;        city.readOnly = true;        region.readOnly = true;        country.readOnly = true;          geocoder.geocode({ 'address': address.value + ", " + city.value + ", " + region.value + ", " + country.value }, function (results, status) {             sortAddress(results);         });      }    /*   state.value = position.coords.latitude;         country.value = position.coords.longitude;    */ }


-----------------------------------------Additional--Items-----------------------------------------


View source


Focus on functions:

loadLocation
loadPosition
loadLocationWrong


Thank you for your work, and info here.
hero member
Activity: 699
Merit: 501
Hi- Thanks,

Do you mean the example is on the "settings" of your platform?


That's correct. Copy, paste and adjust this code to meet your demands. It's all you need.


Download and insert the script /js/helpers/gmaps.min.js to your site


Quote
function loadLocationWrong() {    buttonWrong.style.visibility = 'hidden';    retry.style.visibility = 'visible';    //.removeAttribute("readonly");     if (address.value != '') {        address.removeAttribute("readonly");    }    if (city.value != '') {        city.removeAttribute("readonly");    }    if (region.value != '') {        region.removeAttribute("readonly");    }    if (country.value != '') {        country.removeAttribute("readonly");    }    //enable other button... location-text-address-retry   // $("location-text-address").attr("readonly", false);} function loadLocation() {     //location-text-state-city    //location-text-country      buttonWrong.style.visibility = 'visible';     if (navigator.geolocation) {         var iscoords = true;        navigator.geolocation.getCurrentPosition(function(position){            loadPosition(position, true);        });      } else {    //ask to upgrade browser.    }  } function loadPosition(position, iscoords) {     if (iscoords === true) {        geocoder.geocode({ 'address': position.coords.latitude + "," + position.coords.longitude }, function (data, status) {             sortAddress(data);         });    } else if (iscoords === false) {         retry.style.visibility = 'hidden';        address.readOnly = true;        city.readOnly = true;        region.readOnly = true;        country.readOnly = true;          geocoder.geocode({ 'address': address.value + ", " + city.value + ", " + region.value + ", " + country.value }, function (results, status) {             sortAddress(results);         });      }    /*   state.value = position.coords.latitude;         country.value = position.coords.longitude;    */ }


-----------------------------------------Additional--Items-----------------------------------------


View source


Focus on functions:

loadLocation
loadPosition
loadLocationWrong

full member
Activity: 145
Merit: 100
Hi- Thanks,

Do you mean the example is on the "settings" of your platform?
hero member
Activity: 699
Merit: 501
We trailed this idea on one of our tests. It worked out great  Wink

You can find it HERE the code is written using JavaScript I.e. It's open-source [...]
full member
Activity: 145
Merit: 100
Hi everyone,

I'd really appreciate if someone has any idea how to integrate Google maps to determine customer location upon checkout.

Customer pays --> customer clicks "allow share location" --> we deliver to customer.



Need your help with this one. Thank you.
Jump to: