Hi Shopify community,
I am looking for an application allowing us to get the user address from their GPS location of their mobile browser and match this with Google Map.
This will be used in a food delivery context, have you heard about something like this?
Solved! Go to the solution
Nick here from Shopify. Really good question, I like your thinking on this!
I looked through the Shopify app store and could only find Geo Location apps for when a customer would be in a different country and it would re-direct them based on their country and not a specific GPS address. You can see these Geo Location apps in the app store here.
Because of this, what I think you're looking for is very customized and would probably require to have something custom built for you. It's definitely something which is possible but would need to be built for your needs specifically. You can see the Shopify Expert directory here to research and look for an expert you resonate with and would feel comfortable working with on this for your store.
Hope this answers your question and points you in the right direction for the best next steps!
All the best, Nick
This is an accepted solution.
html5 geolocation returns GPS coordinates only. You will have to pass these coordinates into a geocoding API (Google, MapBox, Here) to fetch city, country, street, etc. Then you'll have to put these fields into checkout form programmatically.
I saw you have got the solution, but just to add one comment. I agree HTML5 GeoLocation API would be the solution in your case, as it can access your visitors' precise location with long/lat data across different browsers and devices. But one thing needs to be aware that it requests visitors' content before geolocation data can be obtained. Thus some visitors' data might not be available as some users may not be comfortable sharing their data. For may details, you may read the post: https://geotargetly.com/html5-geolocation-api
With obtained lat/long data, you can get detailed street address using geocode API matching lat/long data with street address.
While for visitors not granting permission sharing their location, you can potentially provide alternative ways, like letting visitors typing their address manually.
Hope it helps!