<div id="map"> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> <script type="text/javascript"> var map = L.map('map');
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map)
map.locate({setView: true, maxZoom: 16});
function onLocationFound(e) { var radius = e.accuracy / 2;
L.marker(e.latlng).addTo(map).bindPopup("Your pickup spot is in this area").openPopup(); L.circle(e.latlng, radius).addTo(map); }
map.on('locationfound', onLocationFound);
function onLocationError(e) { alert(e.message); }
map.on('locationerror', onLocationError);
</script> </div>