
If you already have an existing Mapbox map, the Map Layers for Mapbox will add to that map the AVUXI heat map layers.
To integrate the widget you first need to load the base code into your page:
<script src="<https://scripts.avuxi.com/travel/map-layers/latest/map-layers-for-mapbox.js>"></script>
As a minimum, you will require to specify the location and your AVUXI key from the dashboard site. Then execute the code, for example by using:
<script src="<https://api.tiles.mapbox.com/mapbox-gl-js/v1.2.0/mapbox-gl.js>"></script>
You can further configure the map enhancer by specifying optional settings:
buttonOrientation it changes the orientation for buttons, by default 'horizontal'buttonBackgroundColor it changes the background color for buttons, by default 'white'buttonForegroundColor it changes the foreground color for buttons, by default 'black'buttonLocation depending if you prefer top/bottom, right/left. For example ‘bl’ is bottom leftshowLegend by default the widget will show the legend for heat mapslanguage force the widget to operate in a specific language (use ISO 639-1 codes) if not available will fallback to EnglishshowMetro by default this option in disabled. If 'true' it will show nearby metro stations.defaultCategory the heat map enabled by default. Delete this category in case you don't want to enable any category when it is opened: 'eating', 'shopping', 'nightlife', 'sightseeing'initialZoom optional. The initial zoom level of the mapinitialLocation