Appearance
KBE3D / KBCore / turf / square
函数: square()
Function
Takes a bounding box and calculates the minimum square bounding box that would contain the input.
参数
bbox
extent in [west, south, east, north] order
返回
a square surrounding bbox
示例
ts
const bbox = [-20, -20, -15, 0];
const squared = turf.square(bbox);
//addToMap
const addToMap = [turf.bboxPolygon(bbox), turf.bboxPolygon(squared)]