KukiGuide Address Picker

Let your customers pick a Rarotonga address from a map — and have it land straight in your form.

What it does

KukiGuide gives every place on Rarotonga a radial-grid address (e.g. 934 Katai Blk). The address picker embeds that map on your site inside an <iframe>, inline in the page. A customer searches or taps a location and your page receives the resolved address, its permanent block code, and latitude/longitude.

Integration is one script tag and one function call. The picker is served from kuki.guide, so map imagery and the address engine always stay current — you never ship an update.

Live demo

Two ways to use the picker — embedded inline in a page, or opened in a popup from a button.

Inline

A mock delivery-order form with the picker embedded directly. Tap the map or search — the preview line updates on every change; the address field is filled when you press Use this address.

Tap the map or search to preview an address.

Popup

The picker opened in a modal from a Find Address button — mounted when the popup opens, destroyed when it closes.

Quick start

Integration is one script tag and one mount() call. Pick the pattern that matches the demo above — inline embeds the picker in the page; popup opens it from a button.

Inline

Add a container, the loader script, and a mount() call:

<div id="address-picker"></div>

<script src="https://kuki.guide/embed.js"></script>
<script>
  KukiPicker.mount('#address-picker', {
    // Fires on every map click / search selection.
    onChange: function (addr) {
      console.log('previewing', addr.address);
    },
    // Fires when the customer presses "Use this address".
    onSelect: function (addr) {
      document.getElementById('address').value = addr.address;
      document.getElementById('block-code').value = addr.code;
    }
  });
</script>

The picker renders inline, filling its container.

Popup

Mount the picker when the popup opens; destroy() it when the popup closes:

<input id="address" readonly>
<button id="find-address">Find Address</button>

<div id="picker-modal" hidden>
  <div id="modal-picker"></div>
  <button id="modal-close">Close</button>
</div>

<script src="https://kuki.guide/embed.js"></script>
<script>
  var modal = document.getElementById('picker-modal');
  var picker = null;

  document.getElementById('find-address').onclick = function () {
    modal.hidden = false;
    picker = KukiPicker.mount('#modal-picker', {
      onSelect: function (addr) {
        document.getElementById('address').value = addr.address;
        closeModal();
      }
    });
  };

  function closeModal() {
    if (picker) { picker.destroy(); picker = null; }
    modal.hidden = true;
  }
  document.getElementById('modal-close').onclick = closeModal;
</script>

Mounting on open (rather than once at page load) keeps the map off the network until the customer actually needs it.

API reference

KukiPicker.mount(target, options)

Builds the picker iframe inside target (a CSS selector or DOM element) and returns a handle.

OptionTypeDescription
onSelectfunctionCalled with the payload below when the customer presses "Use this address".
onChangefunctionCalled with the same payload on every map click / search selection — i.e. live, before any confirm.
addressstringPre-select by address string, e.g. "1008 Katai".
codestringPre-select by permanent block code, e.g. "1008ka1m".
level0–3Sub-block precision for map taps. 0 = block (~25 m), 1 = ~5 m, 2 = ~1 m. Default 1.
geolocatebooleanShow a "my location" button inside the picker. Default off.
levelTogglebooleanShow the L0 / L1 / L2 badge that lets the customer change sub-block precision. Default on — pass false to hide it and lock precision to level.
widthnumber|stringIframe width. Number → px. Default '100%'.
heightnumber|stringIframe height. Number → px. Default 480.

Handle

mount() returns { iframe, destroy }. iframe is the created element; destroy() removes it and detaches the message listener — call it when you unmount the picker (e.g. closing a modal).

Callback payload

onChange and onSelect receive the same object. The type field distinguishes a live change (kuki:change) from a confirmed selection (kuki:address).

FieldTypeExample
typestring"kuki:change" or "kuki:address"
versionnumber1
addressstring"934 Katai Blk"
codestring"934ka1"
urlstring"https://kuki.guide/934ka1"
latnumber-21.2345
lngnumber-159.7788
subBlockLevelnumber1

Tips

Register your integration

Planning to embed the picker on a live site? Please email map@kuki.guide with the site's address. The picker is new and still evolving, so registering lets us:

It is a courtesy notice - the picker works without it today.

Questions

See kuki.guide or email map@kuki.guide.