0.2.1 • Published 8 years ago
avuxi-loader v0.2.1
avuxi-loader
avuxi-loader helps to load and initialize avuxi library.
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 dashboardgoogleMap
(Object): Instance ofgoogle.maps.Map
options
(Object): Extra options for loading avuxi scriptDEFAULT_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
Create a file
./example/config.local.js
with your API keysexport const AVUXI_USER_ID = 'your-id-from-avuxi-dashboard' export const GOOGLE_API_KEY = 'your-api-key-from-google-dashboard'
Run the webpack dev server
npm run example # ➡ http://localhost:8080/example
License
MIT © Alexander Gudulin