Besides the library itself, the download package contains full source code, examples, unit tests, files for debugging and a build system.
Download Leaflet edge (zip, unstable)
Place the contents of the dist
folder somewhere in your directory tree and include it in the head
section of your HTML with the following code:
<!-- Leaflet CSS -->
<link rel="stylesheet" href="<path_to_dist>/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="<path_to_dist>/leaflet.ie.css" /><![endif]-->
<!-- Leaflet JavaScript -->
<script src="<path_to_dist>/leaflet.js"></script>
Open build/build.html
page from the download package, check the components you want to see in your build and run the generated command in the build
directory — your custom build will appear as dist/leaflet-custom.js
.
© 2011 CloudMade. Map data © 2011 OpenStreetMap contributors, CC-BY-SA.