Skip to content

JavaScript for button to show the 3 word address for the user's current location

License

Notifications You must be signed in to change notification settings

cepreu5/w3w-3words-button

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

what3words 3words-button

JavaScript for button to show the 3 word address for the user's current location

Get started

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.

Licensing

MIT

About

JavaScript for button to show the 3 word address for the user's current location

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.6%
  • HTML 20.4%