Skip to content

Commit

Permalink
Merge pull request Leaflet#561 from brandonxiang/master
Browse files Browse the repository at this point in the history
Add polygon.options.metrics to show metric area
  • Loading branch information
ddproxy authored Jul 6, 2016
2 parents b6c03e2 + 81ae653 commit a7e5fff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/full.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
},
draw: {
polygon : {
allowIntersection: false
allowIntersection: false,
showArea:true
}
}
}));
Expand Down
3 changes: 2 additions & 1 deletion src/draw/handler/Draw.Polygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ L.Draw.Polygon = L.Draw.Polyline.extend({
fillColor: null, //same as color by default
fillOpacity: 0.2,
clickable: true
}
},
metric: true // Whether to use the metric measurement system or imperial
},

initialize: function (map, options) {
Expand Down

0 comments on commit a7e5fff

Please sign in to comment.