new Cesium.Rectangle(west, south, east, north)

指定为经度和纬度坐标的二维区域.
Name Type Default Description
west number 0.0 optional Pi,Pi].
south number 0.0 optional Pi/2,Pi/2].
east number 0.0 optional Pi,Pi].
north number 0.0 optional Pi/2,Pi/2].
See:

Members

static constant Cesium.Rectangle.MAX_VALUE : Rectangle

最大的长方形.

static Cesium.Rectangle.packedLength : number

用于将对象组合成数组的元素数量.

east : number

射程最东经弧度[-Pi,Pi].
Default Value: 0.0

readonly height : number

获得弧度矩形的高度.

north : number

射程中最北纬的弧度[-Pi/2,Pi/2].
Default Value: 0.0

south : number

射程最南端的弧度[-Pi/2,Pi/2].
Default Value: 0.0

west : number

射程最西经弧度[-Pi,Pi].
Default Value: 0.0

readonly width : number

获得弧度矩形的宽度.

Methods

static Cesium.Rectangle.center(rectangle, result)Cartographic

计算矩形的中心.
Name Type Description
rectangle Rectangle 寻找中心所在的矩形
result Cartographic optional 存储结果的对象 .
Returns:
如果未提供修改的结果参数或新的 NT% 0 实例 .

static Cesium.Rectangle.clone(rectangle, result)Rectangle

复制一个矩形.
Name Type Description
rectangle Rectangle 长方形到克隆.
result Rectangle optional 存储结果的对象, 或者如果创建新实例时未定义的对象 .
Returns:
The modified result parameter or a new Rectangle instance if none was provided. (Returns undefined if rectangle is undefined)

static Cesium.Rectangle.computeHeight(rectangle)number

计算弧度中矩形的高度.
Name Type Description
rectangle Rectangle 矩以计算高度.
Returns:
The height.

static Cesium.Rectangle.computeWidth(rectangle)number

计算弧度中矩形的宽度.
Name Type Description
rectangle Rectangle 用于计算宽度的矩形.
Returns:
The width.

static Cesium.Rectangle.contains(rectangle, cartographic)boolean

如果绘图在矩形上或内, 返回真实性, 否则会有假 .
Name Type Description
rectangle Rectangle The rectangle
cartographic Cartographic 地图测试.
Returns:
如果提供的制图在矩形内,则真实无误.

static Cesium.Rectangle.equals(left, right)boolean

Compares the provided rectangles and returns true if they are equal, -NT+0+false NT+1+否则.
Name Type Description
left Rectangle optional 第一个矩形.
right Rectangle optional 第二圆矩.
Returns:
如果左侧和右侧是相等的,则使用 NT+0 real NT+1 ;否则 NT+2 false NT+3 .

static Cesium.Rectangle.equalsEpsilon(left, right, absoluteEpsilon)boolean

比较所提供的矩形组件并返回 如果通过绝对或相对耐性测试, -NT+0+false NT+1+否则.
Name Type Default Description
left Rectangle optional 第一个矩形.
right Rectangle optional 第二圆矩.
absoluteEpsilon number 0 optional The absolute epsilon tolerance to use for equality testing.
Returns:
NT################################################################### ##########################################################################################################################################################################################.

static Cesium.Rectangle.expand(rectangle, cartographic, result)Rectangle

通过拓宽提供的矩形来计算矩形,直到它包含提供的制图.
Name Type Description
rectangle Rectangle 一个要扩张的矩形.
cartographic Cartographic 长方形图.
result Rectangle optional 存储结果的对象 .
Returns:
未提供修改的结果参数或新的矩形实例 .

static Cesium.Rectangle.fromBoundingSphere(boundingSphere, ellipsoid, result)Rectangle

从边框创建矩形,忽略高度.
Name Type Default Description
boundingSphere BoundingSphere 边际球体.
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid.
result Rectangle optional 存储结果的对象, 或者如果创建新实例时未定义的对象 .
Returns:
没有提供修改的结果参数或新的矩形实例.

static Cesium.Rectangle.fromCartesianArray(cartesians, ellipsoid, result)Rectangle

创建最小的矩形, 将所提供阵列中的所有位置都连接在一起 .
Name Type Default Description
cartesians Array.<Cartesian3> 笛卡尔实例列表.
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid the cartesians are on.
result Rectangle optional 存储结果的对象, 或者如果创建新实例时未定义的对象 .
Returns:
没有提供修改的结果参数或新的矩形实例.

static Cesium.Rectangle.fromCartographicArray(cartographics, result)Rectangle

创建最小的矩形, 将所提供阵列中的所有位置都连接在一起 .
Name Type Description
cartographics Array.<Cartographic> NT 0 例列表.
result Rectangle optional 存储结果的对象, 或者如果创建新实例时未定义的对象 .
Returns:
没有提供修改的结果参数或新的矩形实例.

static Cesium.Rectangle.fromDegrees(west, south, east, north, result)Rectangle

以纬度和纬度创建矩形.
Name Type Default Description
west number 0.0 optional 射程中最西经度[1800.0,180.0].
south number 0.0 optional 最南端的纬度在幅度内的度[-90.0, 90.0].
east number 0.0 optional 射程中最东经度 [180.0, 180.0].
north number 0.0 optional 射程中以度为单位的最北纬度[-90.0, 90.0].
result Rectangle optional 存储结果的对象, 或者如果创建新实例时未定义的对象 .
Returns:
没有提供修改的结果参数或新的矩形实例.
Example:
const rectangle = Cesium.Rectangle.fromDegrees(0.0, 20.0, 10.0, 30.0);

static Cesium.Rectangle.fromRadians(west, south, east, north, result)Rectangle

以弧度创建边界经度和纬度的矩形.
Name Type Default Description
west number 0.0 optional 射程最西经弧度[- Math.PI , Math.PI ].
south number 0.0 optional 射程最南端的弧度[--Math.PI /2,-Math.PI /2].
east number 0.0 optional 射程最东经弧度[- Math.PI , Math.PI ].
north number 0.0 optional 射程中弧度的最北纬度[--Math.PI /2,-Math.PI /2].
result Rectangle optional 存储结果的对象, 或者如果创建新实例时未定义的对象 .
Returns:
没有提供修改的结果参数或新的矩形实例.
Example:
const rectangle = Cesium.Rectangle.fromRadians(0.0, Math.PI/4, Math.PI/8, 3*Math.PI/4);

static Cesium.Rectangle.intersection(rectangle, otherRectangle, result)Rectangle|undefined

计算两个矩形的交叉点。 此函数假设矩形的坐标是 弧度和经度,产生正确的交叉点,同时考虑到以下事实: 相同角度可以用多个值以及经度的环绕来表示 反美利坚. 一个简单的交叉点,它忽略了这些因素,可以和预测一起使用 coordinates, see Rectangle.simpleIntersection.
Name Type Description
rectangle Rectangle 在矩形上寻找交叉点
otherRectangle Rectangle 找到交叉点的另一个矩形
result Rectangle optional 存储结果的对象 .
Returns:
修改后的结果参数,如果没有提供,则使用新的矩形实例,如果没有交叉点,则未定义.

static Cesium.Rectangle.northeast(rectangle, result)Cartographic

计算一个矩形的东北角.
Name Type Description
rectangle Rectangle 寻找角落的矩形
result Cartographic optional 存储结果的对象 .
Returns:
如果未提供修改的结果参数或新的 NT% 0 实例 .

static Cesium.Rectangle.northwest(rectangle, result)Cartographic

计算一个矩形的西北角.
Name Type Description
rectangle Rectangle 寻找角落的矩形
result Cartographic optional 存储结果的对象 .
Returns:
如果未提供修改的结果参数或新的 NT% 0 实例 .

static Cesium.Rectangle.pack(value, array, startingIndex)Array.<number>

将所提供的实例存储到所提供的数组中.
Name Type Default Description
value Rectangle 包装的价值.
array Array.<number> 装入的阵列.
startingIndex number 0 optional The index into the array at which to start packing the elements.
Returns:
装入的阵列

static Cesium.Rectangle.simpleIntersection(rectangle, otherRectangle, result)Rectangle|undefined

Computes a simple intersection of two rectangles. Unlike Rectangle.intersection, this function 不试图将角坐标放入一个一致的范围,也不试图对穿越 反美利坚. 因此,它可用于坐标并非简单的纬度的矩形 和经度( i.e . 预测坐标).
Name Type Description
rectangle Rectangle 在矩形上寻找交叉点
otherRectangle Rectangle 找到交叉点的另一个矩形
result Rectangle optional 存储结果的对象 .
Returns:
修改后的结果参数,如果没有提供,则使用新的矩形实例,如果没有交叉点,则未定义.

static Cesium.Rectangle.southeast(rectangle, result)Cartographic

计算一个矩形的东南角.
Name Type Description
rectangle Rectangle 寻找角落的矩形
result Cartographic optional 存储结果的对象 .
Returns:
如果未提供修改的结果参数或新的 NT% 0 实例 .

static Cesium.Rectangle.southwest(rectangle, result)Cartographic

计算一个矩形的西南角.
Name Type Description
rectangle Rectangle 寻找角落的矩形
result Cartographic optional 存储结果的对象 .
Returns:
如果未提供修改的结果参数或新的 NT% 0 实例 .

static Cesium.Rectangle.subsample(rectangle, ellipsoid, surfaceHeight, result)Array.<Cartesian3>

取样一个矩形,使其包括一个适合传递到 BoundingSphere#fromPoints. Sampling is necessary to account 为覆盖极点或横跨赤道的矩形.
Name Type Default Description
rectangle Rectangle 长方形至子样.
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid to use.
surfaceHeight number 0.0 optional 椭圆形上方的矩形高度.
result Array.<Cartesian3> optional 存储结果的笛卡尔数组 .
Returns:
未提供修改的结果参数或笛卡尔实例的新矩阵.

static Cesium.Rectangle.subsection(rectangle, westLerp, southLerp, eastLerp, northLerp, result)Rectangle

从 [0.0,1.0] 范围内的常态坐标计算一个矩形小节.
Name Type Description
rectangle Rectangle 矩形至小节.
westLerp number 射程中的西插因子[0.0,1.0]. 一定小于或等于东勒普.
southLerp number 射程中的南插系数[0.0,1.0]. 一定小于或等于北莱普.
eastLerp number 射程中的东方内插系数[0.0,1.0]. 一定大于或等于西莱普.
northLerp number 射程中的北插因子[0.0,1.0]. 必须大于或等于南莱普.
result Rectangle optional 存储结果的对象 .
Returns:
没有提供修改的结果参数或新的矩形实例.

static Cesium.Rectangle.union(rectangle, otherRectangle, result)Rectangle

计算一个矩形,即两个矩形的结合.
Name Type Description
rectangle Rectangle 长方形,可以围成长方形.
otherRectangle Rectangle 长方形,可以围成长方形.
result Rectangle optional 存储结果的对象 .
Returns:
没有提供修改的结果参数或新的矩形实例.

static Cesium.Rectangle.unpack(array, startingIndex, result)Rectangle

从组合的数组中获取实例 .
Name Type Default Description
array Array.<number> 装填的阵列.
startingIndex number 0 optional The starting index of the element to be unpacked.
result Rectangle optional 存储结果的对象.
Returns:
未提供修改的结果参数或新的矩形实例 .

clone(result)Rectangle

复制这个矩形 .
Name Type Description
result Rectangle optional 存储结果的对象 .
Returns:
没有提供修改的结果参数或新的矩形实例.

equals(other)boolean

将所提供的矩形与矩形组件进行比较,然后返回 -NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
Name Type Description
other Rectangle optional 要比较的矩形.
Returns:
如果矩形等值,则使用#NT+0 real NT+1 ,否则使用#NT+2 false NT+3 .

equalsEpsilon(other, epsilon)boolean

将所提供的矩形与矩形组件进行比较,然后返回 如果它们位于提供的epsilon范围内, -NT+0+false NT+1+否则.
Name Type Default Description
other Rectangle optional 要比较的矩形.
epsilon number 0 optional The epsilon to use for equality testing.
Returns:
NT+0 real NT+1 如果矩形位于提供的epsilon, NT+2 false NT+3 否则.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.