JavaScript for button to show the 3 word address for the user's current location
JavaScript HTML
Latest commit 6f8da15 Nov 9, 2016 @tsamaya tsamaya updates logo path
Permalink
Failed to load latest commit information.
3words-button.js
LICENSE.txt
README.md
sample.html

README.md

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