Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function bboxBuffer(pt, distance) {
var sw = turf.destination(pt, distance, -135);
var ne = turf.destination(pt, distance, 45);
return sw.geometry.coordinates.concat(ne.geometry.coordinates);
}
function bboxBuffer(pt, distance) {
var sw = turf.destination(pt, distance, -135);
var ne = turf.destination(pt, distance, 45);
return sw.geometry.coordinates.concat(ne.geometry.coordinates);
}
segmented.features.forEach(function (segment) {
var seglen = segment.geometry.coordinates.length;
var endpoint = turf.point(segment.geometry.coordinates[seglen - 1]);
var bearing = turf.bearing(
turf.point(segment.geometry.coordinates[seglen - 2]), endpoint);
var start = turf.destination(endpoint, 75/5280, bearing - 90, 'miles');
var end = turf.destination(endpoint, 75/5280, bearing + 90, 'miles');
bisectors.push(turf.linestring([start.geometry.coordinates, end.geometry.coordinates]));
});
function locationToCircle(loc, multiplier) {
var point = turf.point([loc.long,loc.lat]);
var distance = signalToMeters(loc.weightedSignal, multiplier);
var coordinates = [];
for (var i=0; i<=360; i+=10) {
coordinates.push( turf.destination(point, distance/1000, i, 'kilometers').geometry.coordinates );
}
var poly = turf.polygon([coordinates]);
return poly;
}
segmented.features.forEach(function (segment) {
var seglen = segment.geometry.coordinates.length;
var endpoint = turf.point(segment.geometry.coordinates[seglen - 1]);
var bearing = turf.bearing(
turf.point(segment.geometry.coordinates[seglen - 2]), endpoint);
var start = turf.destination(endpoint, 75/5280, bearing - 90, 'miles');
var end = turf.destination(endpoint, 75/5280, bearing + 90, 'miles');
bisectors.push(turf.linestring([start.geometry.coordinates, end.geometry.coordinates]));
});
'turf.destination': function () {
for (var i = 0; i < points.length; i++) {
turf.destination(turf.point(points[i]), 1, (i % 360) - 180, 'kilometers');
}
},
'ruler.destination': function () {