JavaScript for button to show the 3 word address for the user's current location
Get your API key at https://map.what3words.com/register?dev=true
Set your API in 3words-button.js
function show3WordAddress(location) {
data = {
key: 'YOUR-W3W-API-KEY',
coords: location.coords.latitude + ',' + location.coords.longitude
};
Then run the sample html file.
Warning: Modern browsers permits finding current location only over HTTPS.
MIT