Skip to content

Instantly share code, notes, and snippets.

@geneorama
Last active August 29, 2015 14:06
Show Gist options
  • Save geneorama/87620c6800e9aec908a0 to your computer and use it in GitHub Desktop.
Save geneorama/87620c6800e9aec908a0 to your computer and use it in GitHub Desktop.
LeafletExample
// Gene Leynes 2014-09-23
// Example taken (borrowed) from http://leafletjs.com/
// I'm using this example to test http://bl.ocks.org/
// (this should now be index.html)
<!DOCTYPE html>
<meta charset="utf-8">
<style>
// create a map in the "map" div, set the view to a given place and zoom
var map = L.map('map').setView([51.505, -0.09], 13);
// add an OpenStreetMap tile layer
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// add a marker in the given location, attach some popup content to it and open the popup
L.marker([51.5, -0.09]).addTo(map)
.bindPopup('A pretty CSS3 popup. <br> Easily customizable.')
.openPopup();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment