Loading Audio into DAEA

  1. Open aa-sites-popup.csv
  2. After link add a comma and audio
  3. For each audio column, add audio html tags: <audio src="test.mp3" controls preload></audio>

For audio source, if you are hosting a local file, make sure to complete the path fully. For instance, if your audio file test.mp3 is hosted in your project folder in sounds the path will be <audio src="sounds/test.mp3" controls preload></audio>

If your audio file is hosted on a url, just put the url in your src: <audio src="http://soundwebsite/test.mp3" controls preload></audio>

  1. Now we have to edit the map script in index.html
  2. Navigate to the map script at the bottom of the page in index.html. You will see this:

<!-- Initiates Map and pulls data from .CSV -->

  1. After marker.toGeoJSON().properties.info + '<br><br> ' +, hit enter to create a new line and add marker.toGeoJSON().properties.audio + '<br><br>' +
  2. You can choose where to place the audio controls based on your preferences. If you want them after siteName, just add marker.toGeoJSON().properties.audio + '<br><br>' +
  3. This binds audio to the leaflet GeoJSON data converted from your aa-sites-popup.csv
  4. That's it!