<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<link rel="stylesheet" href="easy-button.css" />
<style>
#map { height: 400px; width: 400px }
.star{
font-size: 15px;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet-src.js"></script>
<script src="easy-button.js"></script>
<script>
var map = L.map('map').setView([47, 17], 13);
map.addLayer(new L.TileLayer('http://h.tile.openstreetmap.hu/turistautak/{z}/{x}/{y}.png')); //base layer
L.easyButton('<span class="star">★</span>', function(){alert('ogr2ogr -dsco GPX_USE_EXTENSIONS=YES -clipsrc ' +
map.getBounds().toBBoxString().replace(/,/g,' ') +
' -f GPX out.gpx in.gpx waypoints routes track_points')}).addTo(map);
</script>
</body>
</html>