0.2.1 • Published 8 years ago

avuxi-loader v0.2.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

avuxi-loader

avuxi-loader helps to load and initialize avuxi library.

npm js-standard-style Developed at Wimdu

Install

npm install --save avuxi-loader

Usage

import avuxi from 'avuxi-loader'

onGoogleApiLoaded (googleMapInstance) {
  avuxi('AVUXI_USER_ID', googleMapInstance)
}

API

avuxi(apiKey, googleMap, options=DEFAULT_OPTIONS)

Arguments

  • apiKey (String): API key from avuxi dashboard
  • googleMap (Object): Instance of google.maps.Map
  • options (Object): Extra options for loading avuxi script

    DEFAULT_OPTIONS = {
      availableLocales: ['en', 'de'],
      callback: 'avapilLoaded',
      locale: 'en',
      scriptId: 'vxscript',
      type: 'sights', // one from ['sights', 'eating', 'shopping', 'partying']
      url: 'https://m.avuxiapis.com/av'
    }

Run example locally

  1. Create a file ./example/config.local.js with your API keys

    export const AVUXI_USER_ID = 'your-id-from-avuxi-dashboard'
    export const GOOGLE_API_KEY = 'your-api-key-from-google-dashboard'
  2. Run the webpack dev server

    npm run example
    # ➡ http://localhost:8080/example

License

MIT © Alexander Gudulin

0.2.1

8 years ago

0.2.0

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago