npm

Need private packages and team management tools?Check out npm Orgs. »

avuxi-loader

0.2.1 • Public • Published

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'
  1. Run the webpack dev server
npm run example
# ➡ http://localhost:8080/example 

License

MIT © Alexander Gudulin

Keywords

install

npm i avuxi-loader

Downloadsweekly downloads

2

version

0.2.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability