Skip to content

Instantly share code, notes, and snippets.

@kyletolle kyletolle/index.html
Created Jan 15, 2015

What would you like to do?
Broken leaflet toolbar draw example with node_modules
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="" />
<link rel="stylesheet" type="text/css" href="node_modules/leaflet-draw/dist/leaflet.draw.css" />
<link rel="stylesheet" type="text/css" href="//">
<link rel="stylesheet" type="text/css" href="node_modules/leaflet-toolbar/dist/Leaflet.Toolbar.css" />
<link rel="stylesheet" type="text/css" href="//">
<script src="//"></script>
<script src="//"></script>
<script src="//"></script>
<script src="node_modules/leaflet-draw/dist/leaflet.draw-src.js"></script>
<script src="node_modules/leaflet-toolbar/dist/Leaflet.Toolbar.js"></script>
html, body, #map { margin: 0; height: 100%; width: 100%; }
<div id="map"></div>
<script type="text/javascript">
var map ='map').setView([39.862564285, -104.917523860], 15);
L.tileLayer("{z}/{x}/{y}.jpg", {
attribution: 'Map tiles by <a href="">Stamen Design</a>, under <a href="">CC BY 3.0</a>. Data by <a href="">OpenStreetMap</a>, under <a href="">CC BY SA</a>.'
L.DrawToolbar = L.Toolbar.Control.extend({
options: {
actions: [
className: 'leaflet-draw-toolbar' // Style the toolbar with Leaflet.draw's custom CSS
new L.DrawToolbar().addTo(map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.