Skip to content

Commit

Permalink
add JS highlighting to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Feb 7, 2013
1 parent 646cd89 commit 186fbbd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The default state for the control is the draw toolbar just below the zoom contro

Too add the draw toolbar set the option `drawControl: true` in the map options.

````
````js
// create a map in the "map" div, set the view to a given place and zoom
var map = L.map('map', {drawControl: true}).setView([51.505, -0.09], 13);

Expand All @@ -32,7 +32,7 @@ L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {

To use the edit toolbar you must initialise the Leaflet.draw control and manually add it to the map.

````
````js
// create a map in the "map" div, set the view to a given place and zoom
var map = L.map('map', {drawControl: true}).setView([51.505, -0.09], 13);

Expand Down Expand Up @@ -168,7 +168,7 @@ The following example will show you how to:
3. Use a custom marker.
4. Disable the delete functionality.

````
````js
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18}),
map = new L.Map('map', {layers: [cloudmade], center: new L.LatLng(-37.7772, 175.2756), zoom: 15 });
Expand Down Expand Up @@ -240,7 +240,7 @@ map.on('draw:created', function (e) {

If you do not want a particular toolbar in your app you can turn it off by setting the toolbar to false.

````
````js
var drawControl = new L.Control.Draw({
draw: false,
edit: {
Expand All @@ -253,7 +253,7 @@ var drawControl = new L.Control.Draw({

If you want to turn off a particular toolbar item, set it to false. The following disables drawing polygons and markers. It also turns off the ability to edit layers.

````
````js
var drawControl = new L.Control.Draw({
draw: {
polygon: false,
Expand All @@ -275,4 +275,4 @@ All the [contributors](https://github.com/Leaflet/Leaflet.draw/graphs/contributo

The icons used for some of the toolbar buttons are either from http://glyphicons.com/ or inspired by them. <3 Glyphicons!

Finally, [@mourner](https://github.com/mourner) is the man! Thanks for dedicating so much of your time to creating the gosh darn best JavaScript mapping library around.
Finally, [@mourner](https://github.com/mourner) is the man! Thanks for dedicating so much of your time to creating the gosh darn best JavaScript mapping library around.

0 comments on commit 186fbbd

Please sign in to comment.