from
Data(Feature
Collection | Feature<Geometry, any> | Geometry | Shape | Array<Feature
Collection | Feature<Geometry, any> | Geometry | Shape>)
计算这些对象的 FeatureCollection、Feature、Geometry、Shape 或数组的边界框。
from
Dimensions(Position, number, number)
从指定维度构造 BoundingBox。
from
Edges(number, number, number, number)
从指定的边缘构造 BoundingBox。
from
Lat
Lngs(Array<object | number[]>)
从包含坐标信息的任何对象数组创建 BoundingBox。
每个对象都是 格式的数组;[lat, lng] 或 [lat, lng, elv] 或具有以下属性的任意组合的对象: 经度: lng, 经度, lon, x 纬度: lat, latitude, y Elevation: elv, elevation, alt, altitude, z
from
Positions(Position[])
创建包含所有提供的 Position 对象的 BoundingBox。
get
Center(Bounding
Box)
计算边界框的中心。
get
East(Bounding
Box)
返回边界框的东部位置值。
get
Height(Bounding
Box)
获取边界框的高度(以度为单位)。
get
North(Bounding
Box)
返回边界框的北位置值。
get
North
East(Bounding
Box)
返回边界框的东北位置。
get
North
West(Bounding
Box)
返回边界框的西北位置。
get
South(Bounding
Box)
返回边界框的南位置值。
get
South
East(Bounding
Box)
返回边界框的东南位置。
get
South
West(Bounding
Box)
返回边界框的西南位置。
get
West(Bounding
Box)
返回边界框的西部位置值。
get
Width(Bounding
Box)
获取边界框的宽度(以度为单位)。
intersect(Bounding
Box, Bounding
Box)
确定是两个边界框相交的。
merge(Bounding
Box, Bounding
Box)
将两个边界框合并在一起。
split
OnAntimeridian(Bounding
Box)
将跨越 Antimeridian 的 BoundingBox 拆分为两个 BoundingBox。 一个完全以西的安提默迪安,另一个完全在安提默迪安以东。
继承的方法
concat((T | Concat
Array<T>)[])
合并两个或多个数组。
concat(Concat
Array<number>[])
合并两个或多个数组。
every((value: number, index: number, array: number[]) => unknown, any)
确定数组的所有成员是否都满足指定的测试。
filter((value: number, index: number, array: number[]) => unknown, any)
返回数组中满足回调函数中指定的条件的元素。
filter<S>((value: number, index: number, array: number[]) => value, any)
返回数组中满足回调函数中指定的条件的元素。
for
Each((value: number, index: number, array: number[]) => void, any)
为数组中的每个元素执行指定操作。
index
Of(number, number)
返回某个值在数组中的第一个匹配项的索引。
join(string)
添加用指定分隔符字符串分隔的数组的所有元素。
last
Index
Of(number, number)
返回指定值在数组中的最后一个匹配项的索引。
map<U>((value: number, index: number, array: number[]) => U, any)
对数组的每个元素调用定义的回调函数并返回包含结果的数组。
pop()
从数组中移除最后一个元素并将该元素返回。
push(number[])
将新元素追加到一个数组中,并返回数组的新长度。
reduce((previous
Value: number, current
Value: number, current
Index: number, array: number[]) => number)
为数组中的所有元素调用指定的回调函数。 回调函数的返回值是累积的结果,并且作为对回调函数的下一个调用中的参数提供。
reduce((previous
Value: number, current
Value: number, current
Index: number, array: number[]) => number, number)
reduce<U>((previous
Value: U, current
Value: number, current
Index: number, array: number[]) => U, U)
为数组中的所有元素调用指定的回调函数。 回调函数的返回值是累积的结果,并且作为对回调函数的下一个调用中的参数提供。
reduce
Right((previous
Value: number, current
Value: number, current
Index: number, array: number[]) => number)
以降序为数组中的所有元素调用指定的回调函数。 回调函数的返回值是累积的结果,并且作为对回调函数的下一个调用中的参数提供。
reduce
Right((previous
Value: number, current
Value: number, current
Index: number, array: number[]) => number, number)
reduce
Right<U>((previous
Value: U, current
Value: number, current
Index: number, array: number[]) => U, U)
以降序为数组中的所有元素调用指定的回调函数。 回调函数的返回值是累积的结果,并且作为对回调函数的下一个调用中的参数提供。
reverse()
反转 Array 中的元素。
shift()
从数组中移除第一个元素并将返回该元素。
slice(number, number)
返回一个数组中的一部分。
some((value: number, index: number, array: number[]) => unknown, any)
确定指定的回调函数是否为数组的任何元素返回 true。
sort((a: number, b: number) => number)
对数组进行排序。
splice(number, number)
从一个数组中移除元素,如有必要,在所移除元素的位置上插入新元素,并返回所移除的元素。
splice(number, number, number[])
从一个数组中移除元素,如有必要,在所移除元素的位置上插入新元素,并返回所移除的元素。
to
Locale
String()
返回数组的字符串表示形式。 元素使用其 toLocalString 方法转换为字符串。
to
String()
返回数组的字符串表示形式。
unshift(number[])
在数组的开头插入新元素。
static function fromData(data: FeatureCollection | Feature<Geometry, any> | Geometry | Shape | Array<FeatureCollection | Feature<Geometry, any> | Geometry | Shape>): BoundingBox
FeatureCollection
|
Feature
<
Geometry
, any> |
Geometry
|
Shape
| Array<
FeatureCollection
|
Feature
<
Geometry
, any> |
Geometry
|
Shape
>
要计算其边界框的 FeatureCollection、Feature、Geometry、Shape 或数组。
BoundingBox
格式为 [minLon, minLat, maxLon, maxLat] 的边界框。
static function fromDimensions(center: Position, width: number, height: number): BoundingBox
center
Position
边界框的中心位置。
width
number
边界框的宽度。
height
number
边界框的高度。
BoundingBox
static function fromEdges(west: number, south: number, east: number, north: number): BoundingBox
number
边界框的西边缘。
south
number
边界框的南边缘。
number
边界框的东边缘。
north
number
边界框的北边缘。
BoundingBox
从包含坐标信息的任何对象数组创建 BoundingBox。
每个对象都是 格式的数组;[lat, lng] 或 [lat, lng, elv] 或具有以下属性的任意组合的对象: 经度: lng, 经度, lon, x 纬度: lat, latitude, y Elevation: elv, elevation, alt, altitude, z
static function fromLatLngs(latLngs: Array<object | number[]>): BoundingBox
latLngs
Array<object | number[]>
包含坐标信息的对象。
BoundingBox
包含提供的所有坐标信息的 BoundingBox。
function every(callbackfn: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean
callbackfn
(value: number, index: number, array: number[]) => unknown
最多可以接受三个参数的函数。 每个方法为数组中的每个元素调用 callbackfn 函数,直到 callbackfn 返回一个可强制转换为布尔值 false 的值,或直到数组的末尾。
thisArg
此关键字可以在 callbackfn 函数中引用的对象。
如果省略 thisArg,则 undefined 用作此值。
boolean
function filter(callbackfn: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]
callbackfn
(value: number, index: number, array: number[]) => unknown
最多可以接受三个参数的函数。 筛选器方法为数组中的每个元素调用一次 callbackfn 函数。
thisArg
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则 undefined 用作此值。
number[]
function filter<S>(callbackfn: (value: number, index: number, array: number[]) => value, thisArg?: any): S[]
callbackfn
(value: number, index: number, array: number[]) => value
最多可以接受三个参数的函数。 筛选器方法为数组中的每个元素调用一次 callbackfn 函数。
thisArg
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则 undefined 用作此值。
function forEach(callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any)
callbackfn
(value: number, index: number, array: number[]) => void
最多可以接受三个参数的函数。 forEach 为数组中的每个元素调用一次 callbackfn 函数。
thisArg
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则 undefined 用作此值。
function map<U>(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]
callbackfn
(value: number, index: number, array: number[]) => U
最多可以接受三个参数的函数。 map 方法为数组中的每个元素调用一次 callbackfn 函数。
thisArg
此关键字可以在 callbackfn 函数中引用的对象。 如果省略 thisArg,则 undefined 用作此值。
function reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number
callbackfn
(previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number
一个最多接受四个参数的函数。 reduce 方法为数组中的每个元素调用一次 callbackfn 函数。
number
function reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number
callbackfn
(previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number
function reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U
callbackfn
(previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U
一个最多接受四个参数的函数。 reduce 方法为数组中的每个元素调用一次 callbackfn 函数。
initialValue
如果指定了 initialValue,则将其用作开始累积的初始值。 第一次调用 callbackfn 函数会将此值作为参数而不是数组值提供。
function reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number
callbackfn
(previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number
一个最多接受四个参数的函数。 reduceRight 方法为数组中的每个元素调用回调fn 函数一次。
number
function reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number
callbackfn
(previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number
function reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U
callbackfn
(previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U
一个最多接受四个参数的函数。 reduceRight 方法为数组中的每个元素调用回调fn 函数一次。
initialValue
如果指定了 initialValue,则将其用作开始累积的初始值。 对 callbackfn 函数的第一次调用将此值作为参数提供,而不是数组值。
function some(callbackfn: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean
callbackfn
(value: number, index: number, array: number[]) => unknown
最多可以接受三个参数的函数。 一些 方法为数组中的每个元素调用 callbackfn 函数,直到 callbackfn 返回一个可强制转换为布尔值 true 的值,或直到数组的末尾。
thisArg
此关键字可以在 callbackfn 函数中引用的 对象。
如果省略 thisArg,则将 undefined 用作此值。
boolean