Coder Social home page Coder Social logo

addynz / nz-address-autocomplete Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 74 KB

Address Autocomplete for New Zealand Addresses. Lightweight and simple code samples for calling a RESTful API, validating addresses against the NZ Postal Address File and LINZ databases, from a HTML and JavaScript address capture form.

Home Page: https://www.addy.co.nz/

License: MIT License

HTML 79.30% CSS 20.70%
address-autocomplete addi nz-postal-address zealand-addresses widget delivery addy-service paf new-zealand address-formatter

nz-address-autocomplete's Introduction

This repository has been made obsolete. Use Address-Lookup repository instead.

Addy's Address Autocomplete

https://www.addy.co.nz/

Addy's Address Autocomplete will suggest New Zealand street addresses while you type.

This repository contains lightweight and simple code samples for calling the address finder API, validating addresses against the NZ Postal Address File (PAF) and LINZ databases, from a HTML and JavaScript address capture form.

Addy Address Autocomplete

Addy's service is using advanced fuzzy matching (See: https://www.addy.co.nz/address-finder-fuzzy-matching) to correct spelling mistakes.

Benefits

  • Increase conversion rates with an improved checkout process
  • Deliver to the right address, the first time
  • Verify and validate address details in real-time

Get Started

Create a free account https://www.addy.co.nz/signup to get an API key.

  1. Include addycomplete.min.css in your page, via the usual tags:
<link rel="stylesheet" href="addycomplete.min.css" />
  1. Include addycomplete.min.js at the bottom of the page, before closing the body tag:
<script src="addycomplete.min.js?key=YOUR-ADDY-KEY&callback=initAddy" async defer></script>

Replace YOUR-ADDY-KEY with your own Addy API Key.

Define the fields and options that will be called by the initAddy callback function once the script has loaded.

function initAddy() {
    var addyComplete = new AddyComplete(document.getElementById("address1"));
    addyComplete.fields = {
        address1: document.getElementById("address1"),
        address2: document.getElementById("address2"),
        suburb: document.getElementById("suburb"),
        city: document.getElementById("city"),
        postcode: document.getElementById("postcode")
    }
}

Live demo and documentation: https://www.addy.co.nz/nz-address-autocomplete-example

Awesomplete Extension

Addy's autocomplete code is based on the awesomplete https://github.com/LeaVerou/awesomplete (MIT License) widget by extending it to call Addy's NZ address finder API.

Prices

Addy's address autocomplete widget is free of charge; download and install it at no cost. Just setup an account with Addy. See: https://www.addy.co.nz/pricing

Links

Official Addy site: https://www.addy.co.nz/

RESTful Address Finder API Documentation: https://www.addy.co.nz/address-postcode-finder-integrations

All Documentation: https://www.addy.co.nz/documentation

Frequently Asked Questions: https://www.addy.co.nz/frequently-asked-questions

License

The NZ-Address-Autocomplete code is released under the MIT License, which has the same license as awesomplete https://github.com/LeaVerou/awesomplete.

nz-address-autocomplete's People

Contributors

stenly311 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.