Here's a little map I wrote

The code below is the code that generates the embedded map above. To embed the javascript and get the map to work you need to add the leaflet CSS files to the header of your theme. Go to Settings > Code injection and paste the link to the CSS into the header section.

<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />

Then, in the body of your post you can insert the HTML <div> and <script> tags which will be parsed along with the Markdown in the final output HTML file.

<div id="map" style="width: 100%; height: 400px;"></div>

<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>

<script>
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
		attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
	}).addTo(map);
	L.marker([51.5, -0.09]).addTo(map)
	.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();
	L.circle([51.508, -0.11], 500, {
	color: 'red',
	fillColor: '#f03',
	fillOpacity: 0.5
	}).addTo(map).bindPopup("I am a circle.");
	L.polygon([
		[51.509, -0.08],
		[51.503, -0.06],
		[51.51, -0.047]
	]).addTo(map).bindPopup("I am a polygon.");
	var popup = L.popup();
	function onMapClick(e) {
		popup
			.setLatLng(e.latlng)
			.setContent("You clicked the map at " + e.latlng.toString())
			.openOn(map);
	}
	map.on('click', onMapClick);