Reduce circle segments count (#349)
This commit is contained in:
parent
5995e2e879
commit
fde629fcb0
1 changed files with 2 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ BR.CircleGoArea = L.Control.extend({
|
|||
if (center) {
|
||||
var polygon = this.circleToPolygon(center, this.options.radius);
|
||||
$('#nogoJSON').val(JSON.stringify(polygon));
|
||||
$('#nogoBuffer').val(0);
|
||||
this.nogos.uploadNogos();
|
||||
} else {
|
||||
this.nogos.clear();
|
||||
|
|
@ -164,7 +165,7 @@ BR.CircleGoArea = L.Control.extend({
|
|||
},
|
||||
|
||||
circleToPolygon: function(center, radius, numberOfSegments) {
|
||||
var n = numberOfSegments ? numberOfSegments : 64;
|
||||
var n = numberOfSegments ? numberOfSegments : 32;
|
||||
|
||||
var inner = [];
|
||||
for (var i = 0; i < n; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue