A very basic example of out to add Aloft's map layers to your application.
You'll need a few pieces of information to get started.
- Aloft API Token - Get this from your Aloft contact
- Aloft API Url - Get this from your Aloft contact.
- Mapbox API Key - A basic api key from mapbox.com is required.
- Clone this repo onto your local machine
- Open the mapbox_demo.html file in an editor
- Replace the following variables with the required values from the previous section
var aloftToken = '';
var aloftAPIUrl = '';
var mapboxToken = '';
- Save the file and open in your web browser
- That's it! You should now see a basic map loading.
With the basic map layers and styles loading you can add custom logic to enhance the styles anad only show select layers vs. everything Aloft has to offer.