Giter Site home page Giter Site logo

tomato-fox / data_address_jquery Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 240 KB

Jquery plugin for Address lookup using DataFox API

License: Other

CSS 2.71% JavaScript 95.19% HTML 0.41% TypeScript 1.69%
australia-post address-verification api-client

data_address_jquery's Introduction

AtomatoData AU address autocomplete.

www.atomatodata.com.au

API

  • $(selector).dataAddress(options);
    • Sets up autocomplete for input field(s).
    • options: An object literal which defines the settings to use for the autocomplete plugin. Available option settings listed below.

Example

This example will add auticomplete to field #address-lookup-field and onSelect field #streetNameFieldId will have be populated with street name.

  $('#address-lookup-field').dataAddress({
      serviceUrl: 'https://api.atomatodata.com.au/v1/geo/search/lookup',
      apiToken: '##################',
      useNA: true
      formFields: {
        streetName: '#streetNameFieldId'
      }
    })

Configuration Settings

  • serviceUrl: API endpoint
  • apiToken: API Access Token
  • useNA: Pass N/A to form field
  • formFields: List of fields to map values into

Callbacks

  • onSelect: function (suggestion) {}: Callback function invoked when user selects suggestion from the list. this inside callback refers to input HtmlElement.

formFields Dataset

  • address: Full address line
  • buildingName: Building name if available
  • flatNumber: Flat/Unit number if available
  • highlight: Highlighted result
  • latitude: Latitude
  • longitude: Longitude
  • localityName: Suburb name
  • lotId: Full Plan/Lot ID
  • lotNumber: Lookup Plan/Lot ID
  • postcode: Location Postcode
  • state: State Name
  • streetName: Street Name
  • streetSuffix: Street Suffix
  • streetType: Street Type

Instance Methods

Autocomplete instance has following methods:

  • setOptions(options): you may update any option at any time. Options are listed above.
  • clear: clears suggestion cache and current suggestions.
  • clearCache: clears suggestion cache.
  • disable: deactivate autocomplete.
  • enable: activates autocomplete if it was deactivated before.
  • hide: hides suggestions.
  • dispose: destroys autocomplete instance. All events are detached and suggestion containers removed.

License

Based on Ajax Autocomplete for jQuery which is freely distributable under the terms of an MIT-style license.

Copyright notice and permission notice shall be included in all copies or substantial portions of the Software.

Authors

Tomas Kirda / @tkirda

Alexander Tsirel / @noma4i

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.