Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<meta charset="utf-8">
<title>Audio Demo</title>
<link rel="stylesheet" href="" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="" />
<script src=""></script>
<script src="">
<script type="text/javascript" src="leaflet.ajax.js"></script>
<style type="text/css">
html {
height: 100%;
body {
height: 100%;
#map {
height: 95%;
<div id="map"></div>
<script type="text/javascript">
var map ='map').setView([34, -100], 4);
var audioIcon = L.icon({
iconUrl: 'audio.png',
iconSize: [32, 37],
shadowSize: [0, 0],
iconAnchor: [16, 37],
shadowAnchor: [0, 0],
popupAnchor: [0, -37]
function onEachAudio(feature, layer) {
layer.bindPopup( + "<br>" +;
new L.GeoJSON.AJAX("audio.geojson", {
onEachFeature: onEachAudio,
pointToLayer: function(feature, latlng) {
return L.marker(latlng, {icon: audioIcon});
attribution: '<a href="">Stamen base map</a>',
maxZoom: 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.