@allmaps/stdlib (英语)
全部地图标准库
许可证
麻省理工学院
API 密码
new ResourceFetchError(kind, input, options)
参数
kind(单位:千美元)'http' | 'network-or-cors'(中文(简体) )input(单位:千美元)URL | RequestInfo(中文(简体) )options(单位:千美元)ResourceFetchErrorOptions | undefined(中文(简体) )
回返
ResourceFetchError。 。 。 .
扩展
Error
ResourceFetchError#cause?
类型
unknown
ResourceFetchError#corsLikely
类型
boolean
ResourceFetchError#input
类型
URL | RequestInfo
ResourceFetchError#kind
类型
'http' | 'network-or-cors'
ResourceFetchError#status?
类型
number
ResourceFetchError#statusText?
类型
string
ResourceFetchError#url
类型
string
ResourceFetchErrorKind
类型
'http' | 'network-or-cors'
angle(line)
参数
line(单位:千美元)[Point, Point](中文(简体) )
回返
number。 。 。 .
angularMean(angles)
参数
angles(单位:千美元)number(中文(简体) )
回返
number。 。 。 .
arrayContains(array, object, isEqualObject)
参数
array(单位:千美元)Array<T>(中文(简体) )object(单位:千美元)T(中文(简体) )isEqualObject(单位:千美元)((t0: T, t1: T) => boolean) | undefined(中文(简体) )
回返
{item: T; index: number} | undefined。 。 。 .
arrayDifference(array0, array1, isEqualObject)
参数
array0(单位:千美元)Array<T>(中文(简体) )array1(单位:千美元)Array<T>(中文(简体) )isEqualObject(单位:千美元)((t0: T, t1: T) => boolean) | undefined(中文(简体) )
回返
Array<T>。 。 。 .
arrayMatrixSize(arrayMatrix)
参数
arrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )
回返
[number, number]。 。 。 .
arrayRepeated(array, isEqualObject)
参数
array(单位:千美元)Array<T>(中文(简体) )isEqualObject(单位:千美元)((t0: T, t1: T) => boolean) | undefined(中文(简体) )
回返
Array<{item: T; index: number}>。 。 。 .
arrayUnique(array, isEqualObject)
参数
array(单位:千美元)Array<T>(中文(简体) )isEqualObject(单位:千美元)((t0: T, t1: T) => boolean) | undefined(中文(简体) )
回返
Array<T>。 。 。 .
bboxToCenter(bbox)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )
回返
[number, number]。 。 。 .
bboxToDiameter(bbox)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )
回返
number。 。 。 .
bboxToLine(bbox)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )
回返
[Point, Point]。 。 。 .
bboxToPolygon(bbox)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )
回返
Array<Array<Point>>。 。 。 .
bboxToRectangle(bbox)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )
回返
[Point, Point, Point, Point]。 。 。 .
bboxToResolution(bbox)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )
回返
number。 。 。 .
bboxToSize(bbox)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )
回返
[number, number]。 。 。 .
bboxesToScale(bbox0, bbox1, fit)
参数
bbox0(单位:千美元)[number, number, number, number](中文(简体) )bbox1(单位:千美元)[number, number, number, number](中文(简体) )fit?(单位:千美元)Fit | undefined(中文(简体) )
回返
number。 。 。 .
bufferBbox(bbox, dist0, dist1)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )dist0(单位:千美元)number(中文(简体) )dist1?(单位:千美元)number | undefined(中文(简体) )
回返
[number, number, number, number]。 。 。 .
bufferBboxByRatio(bbox, ratio)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )ratio?(单位:千美元)number | undefined(中文(简体) )
回返
[number, number, number, number]。 。 。 .
camelCaseToWords(string)
参数
string(单位:千美元)string(中文(简体) )
回返
string。 。 。 .
clipPoint(point, min, max)
参数
point(单位:千美元)[number, number](中文(简体) )min(单位:千美元)[number, number](中文(简体) )max(单位:千美元)[number, number](中文(简体) )
回返
[number, number]。 。 。 .
clipPointLngLatProjection(point)
参数
point(单位:千美元)[number, number](中文(简体) )
回返
[number, number]。 。 。 .
clipPointWebMercatorProjection(point)
参数
point(单位:千美元)[number, number](中文(简体) )
回返
[number, number]。 。 。 .
clipValue(value, min, max)
参数
value(单位:千美元)number(中文(简体) )min(单位:千美元)number(中文(简体) )max(单位:千美元)number(中文(简体) )
回返
number。 。 。 .
closeMultiPolygon(multiPolygon)
参数
multiPolygon(单位:千美元)Array<Array<Array<Point>>>(中文(简体) )
回返
Array<Array<Array<Point>>>。 。 。 .
closePolygon(polygon)
参数
polygon(单位:千美元)Array<Array<Point>>(中文(简体) )
回返
Array<Array<Point>>。 。 。 .
closeRing(ring)
参数
ring(单位:千美元)Array<Point>(中文(简体) )
回返
Array<Point>。 。 。 .
combineBboxes(bboxes)
参数
bboxes(单位:千美元)[number, number, number, number](中文(简体) )
回返
Bbox | undefined。 。 。 .
computeBbox(geometry)
参数
geometry(单位:千美元)GeojsonGeometry | Geometry(中文(简体) )
回返
[number, number, number, number]。 。 。 .
computeMinMax(values)
参数
values(单位:千美元)Array<number>(中文(简体) )
回返
[number, number]。 。 。 .
computeRotatedBboxProperties(geometry, angle)
参数
geometry(单位:千美元)GeojsonGeometry | Geometry(中文(简体) )angle(单位:千美元)number(中文(简体) )
回返
{ center: Point size: Size bbox: Bbox rectangle: Rectangle rotatedRectangle: Rectangle }。 。 。 .
conformLineString(lineString)
参数
lineString(单位:千美元)Array<Point>(中文(简体) )
回返
Array<Point>。 。 。 .
conformMultiLineString(multiLineString)
参数
multiLineString(单位:千美元)Array<Array<Point>>(中文(简体) )
回返
Array<Array<Point>>。 。 。 .
conformMultiPolygon(multiPolygon)
参数
multiPolygon(单位:千美元)Array<Array<Array<Point>>>(中文(简体) )
回返
Array<Array<Array<Point>>>。 。 。 .
conformPolygon(polygon)
参数
polygon(单位:千美元)Array<Array<Point>>(中文(简体) )
回返
Array<Array<Point>>。 。 。 .
conformRing(ring)
参数
ring(单位:千美元)Array<Point>(中文(简体) )
回返
Array<Point>。 。 。 .
contractGeojsonGeometriesToGeojsonMultiGeometry(geojsonGeometries)
参数
geojsonGeometries(单位:千美元)Array<GeojsonLineString | GeojsonPoint | GeojsonPolygon>(中文(简体) )
回返
GeojsonMultiLineString | GeojsonMultiPoint | GeojsonMultiPolygon。 。 。 .
contractGeojsonLineStringsToGeojsonMultiLineString(geojsonLineStrings)
参数
geojsonLineStrings(单位:千美元)Array<GeojsonLineString>(中文(简体) )
回返
{type: 'MultiLineString'; coordinates: number[][][]}。 。 。 .
contractGeojsonPointsToGeojsonMultiPoint(geojsonPoints)
参数
geojsonPoints(单位:千美元)Array<GeojsonPoint>(中文(简体) )
回返
{type: 'MultiPoint'; coordinates: number[][]}。 。 。 .
contractGeojsonPolygonsToGeojsonMultiPolygon(geojsonPolygons)
参数
geojsonPolygons(单位:千美元)Array<GeojsonPolygon>(中文(简体) )
回返
{type: 'MultiPolygon'; coordinates: number[][][][]}。 。 。 .
convexHull(points)
参数
points(单位:千美元)Array<Point>(中文(简体) )
回返
Ring | undefined。 。 。 .
degreesToRadians(degrees)
参数
degrees(单位:千美元)number(中文(简体) )
回返
number。 。 。 .
distance(from, to)
参数
from(单位:千美元)[number, number](中文(简体) )to(单位:千美元)[number, number](中文(简体) )
回返
number。 。 。 .
doBboxesIntersect(bbox0, bbox1)
参数
bbox0(单位:千美元)[number, number, number, number](中文(简体) )bbox1(单位:千美元)[number, number, number, number](中文(简体) )
回返
boolean。 。 。 .
equalSet(set1, set2)
参数
set1(单位:千美元)Set<T> | null(中文(简体) )set2(单位:千美元)Set<T> | null(中文(简体) )
回返
boolean。 。 。 .
expandGeojsonMultiGeometryToGeojsonGeometries(geojsonMultiGeometry)
参数
geojsonMultiGeometry(单位:千美元)GeojsonMultiLineString | GeojsonMultiPoint | GeojsonMultiPolygon(中文(简体) )
回返
Array<GeojsonLineString> | Array<GeojsonPoint> | Array<GeojsonPolygon>。 。 。 .
expandGeojsonMultiLineStringToGeojsonLineStrings(geojsonMultiLineString)
参数
geojsonMultiLineString(单位:千美元){type: 'MultiLineString'; coordinates: number[][][]}(中文(简体) )
回返
Array<GeojsonLineString>。 。 。 .
expandGeojsonMultiPointToGeojsonPoints(geojsonMultiPoint)
参数
geojsonMultiPoint(单位:千美元){type: 'MultiPoint'; coordinates: number[][]}(中文(简体) )
回返
Array<GeojsonPoint>。 。 。 .
expandGeojsonMultiPolygonToGeojsonPolygons(geojsonMultiPolygon)
参数
geojsonMultiPolygon(单位:千美元){type: 'MultiPolygon'; coordinates: number[][][][]}(中文(简体) )
回返
Array<GeojsonPolygon>。 。 。 .
fetchAnnotationsFromApi(restBaseUrl, parsedIiif, fetch)
参数
restBaseUrl(单位:千美元)string(中文(简体) )parsedIiif(单位:千美元)Collection | Image | Manifest(中文(简体) )fetch?(单位:千美元)| ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefined(中文(简体) )
回返
Promise<any>。 。 。 .
fetchImageBitmap(input, init, fetchFn)
参数
input(单位:千美元)URL | RequestInfo(中文(简体) )init?(单位:千美元)RequestInit | undefined(中文(简体) )fetchFn?(单位:千美元)FetchFn | undefined(中文(简体) )
回返
Promise<ImageBitmap>。 。 。 .
fetchImageInfo(imageUri, init, fetchFn)
参数
imageUri(单位:千美元)string(中文(简体) )init?(单位:千美元)RequestInit | undefined(中文(简体) )fetchFn?(单位:千美元)FetchFn | undefined(中文(简体) )
回返
Promise<unknown>。 。 。 .
fetchJson(input, init, fetchFn)
参数
input(单位:千美元)URL | RequestInfo(中文(简体) )init?(单位:千美元)RequestInit | undefined(中文(简体) )fetchFn?(单位:千美元)FetchFn | undefined(中文(简体) )
回返
Promise<unknown>。 。 。 .
fetchUrl(input, init, fetchFn)
参数
input(单位:千美元)URL | RequestInfo(中文(简体) )init?(单位:千美元)RequestInit | undefined(中文(简体) )fetchFn?(单位:千美元)FetchFn | undefined(中文(简体) )
回返
Promise<Response>。 。 。 .
flipX(point)
参数
point(单位:千美元)[number, number](中文(简体) )
回返
[number, number]。 。 。 .
flipY(point)
参数
point(单位:千美元)[number, number](中文(简体) )
回返
[number, number]。 。 。 .
geojsonFeatureCollectionToGeojsonGeometries(geojsonFeatureCollection)
参数
geojsonFeatureCollection(单位:千美元){type: 'FeatureCollection'; features: GeojsonFeature[]}(中文(简体) )
回返
Array<GeojsonGeometry>。 。 。 .
geojsonFeatureToGeojsonGeometry(geojsonFeature)
参数
geojsonFeature(单位:千美元){type: 'Feature'; properties: unknown; geometry: GeojsonGeometry}(中文(简体) )
回返
| GeojsonLineString | GeojsonMultiLineString | GeojsonMultiPoint | GeojsonMultiPolygon | GeojsonPoint | GeojsonPolygon。 。 。 .
geojsonFeaturesToGeojsonFeatureCollection(geojsonFeatures)
参数
geojsonFeatures(单位:千美元)Array<GeojsonFeature> | GeojsonFeature(中文(简体) )
回返
{type: 'FeatureCollection'; features: GeojsonFeature[]}。 。 。 .
geojsonGeometriesToGeojsonFeatureCollection(geojsonGeometries, properties)
参数
geojsonGeometries(单位:千美元)Array<GeojsonGeometry>(中文(简体) )properties?(单位:千美元)Array<unknown> | undefined(中文(简体) )
回返
{type: 'FeatureCollection'; features: GeojsonFeature[]}。 。 。 .
geojsonGeometryToGeojsonFeature(geojsonGeometry, properties)
参数
geojsonGeometry(单位:千美元)| GeojsonLineString | GeojsonMultiLineString | GeojsonMultiPoint | GeojsonMultiPolygon | GeojsonPoint | GeojsonPolygon(中文(简体) )properties?(单位:千美元)unknown(中文(简体) )
回返
{type: 'Feature'; properties: unknown; geometry: GeojsonGeometry}。 。 。 .
geojsonGeometryToGeometry(geojsonPoint)
参数
geojsonPoint(单位:千美元){type: 'Point'; coordinates: number[]}(中文(简体) )
回返
[number, number]。 。 。 .
geojsonGeometryToSvgGeometry(geojsonGeometry)
参数
geojsonGeometry(单位:千美元)| GeojsonLineString | GeojsonMultiLineString | GeojsonMultiPoint | GeojsonMultiPolygon | GeojsonPoint | GeojsonPolygon(中文(简体) )
回返
SvgCircle | SvgLine | SvgPolyLine | SvgPolygon | SvgRect。 。 。 .
geojsonLineStringToLineString(geojsonLineString)
参数
geojsonLineString(单位:千美元){type: 'LineString'; coordinates: number[][]}(中文(简体) )
回返
Array<Point>。 。 。 .
geojsonMultiLineStringToMultiLineString(geojsonMultiLineString)
参数
geojsonMultiLineString(单位:千美元){type: 'MultiLineString'; coordinates: number[][][]}(中文(简体) )
回返
Array<Array<Point>>。 。 。 .
geojsonMultiPointToMultiPoint(geojsonMultiPoint)
参数
geojsonMultiPoint(单位:千美元){type: 'MultiPoint'; coordinates: number[][]}(中文(简体) )
回返
Array<Point>。 。 。 .
geojsonMultiPolygonToMultiPolygon(geojsonMultiPolygon, close)
参数
geojsonMultiPolygon(单位:千美元){type: 'MultiPolygon'; coordinates: number[][][][]}(中文(简体) )close(单位:千美元)boolean | undefined(中文(简体) )
回返
Array<Array<Array<Point>>>。 。 。 .
geojsonPointToPoint(geojsonPoint)
参数
geojsonPoint(单位:千美元){type: 'Point'; coordinates: number[]}(中文(简体) )
回返
[number, number]。 。 。 .
geojsonPolygonToPolygon(geojsonPolygon, close)
参数
geojsonPolygon(单位:千美元){type: 'Polygon'; coordinates: number[][][]}(中文(简体) )close(单位:千美元)boolean | undefined(中文(简体) )
回返
Array<Array<Point>>。 。 。 .
geojsonPolygonToRing(geojsonPolygon, close)
参数
geojsonPolygon(单位:千美元){type: 'Polygon'; coordinates: number[][][]}(中文(简体) )close(单位:千美元)boolean | undefined(中文(简体) )
回返
Array<Point>。 。 。 .
geometryToDiameter(geometry)
参数
geometry(单位:千美元)GeojsonGeometry | Geometry(中文(简体) )
回返
number。 。 。 .
geometryToGeojsonGeometry(point, options)
参数
point(单位:千美元)[number, number](中文(简体) )options?(单位:千美元)Partial<MultiGeometryOptions> | undefined(中文(简体) )
回返
{type: 'Point'; coordinates: number[]}。 。 。 .
geometryToSvgGeometry(point)
参数
point(单位:千美元)[number, number](中文(简体) )
回返
{type: 'circle'; attributes?: SvgAttributes; coordinates: Point}。 。 。 .
getFullResourceMask(imageWidth, imageHeight)
参数
imageWidth(单位:千美元)number(中文(简体) )imageHeight(单位:千美元)number(中文(简体) )
回返
Array<Point>。 。 。 .
getPropertyFromCacheOrComputation(cache, key, computation, checkUse, checkStore)
参数
cache(单位:千美元)Map<K, T>(中文(简体) )key(单位:千美元)K(中文(简体) )computation(单位:千美元)() => T(中文(简体) )checkUse(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )checkStore(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )
回返
T。 。 。 .
getPropertyFromDoubleCacheOrComputation(cache, key0, key1, computation, checkUse, checkStore)
参数
cache(单位:千美元)Map<K0, Map<K1, T>>(中文(简体) )key0(单位:千美元)K0(中文(简体) )key1(单位:千美元)K1(中文(简体) )computation(单位:千美元)() => T(中文(简体) )checkUse(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )checkStore(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )
回返
T。 。 。 .
getPropertyFromQuadrupleCacheOrComputation(cache, key0, key1, key2, key3, computation, checkUse, checkStore)
参数
cache(单位:千美元)Map<K0, Map<K1, Map<K2, Map<K3, T>>>>(中文(简体) )key0(单位:千美元)K0(中文(简体) )key1(单位:千美元)K1(中文(简体) )key2(单位:千美元)K2(中文(简体) )key3(单位:千美元)K3(中文(简体) )computation(单位:千美元)() => T(中文(简体) )checkUse(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )checkStore(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )
回返
T。 。 。 .
getPropertyFromQuintupleCacheOrComputation(cache, key0, key1, key2, key3, key4, computation, checkUse, checkStore)
参数
cache(单位:千美元)Map<K0, Map<K1, Map<K2, Map<K3, Map<K4, T>>>>>(中文(简体) )key0(单位:千美元)K0(中文(简体) )key1(单位:千美元)K1(中文(简体) )key2(单位:千美元)K2(中文(简体) )key3(单位:千美元)K3(中文(简体) )key4(单位:千美元)K4(中文(简体) )computation(单位:千美元)() => T(中文(简体) )checkUse(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )checkStore(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )
回返
T。 。 。 .
getPropertyFromTripleCacheOrComputation(cache, key0, key1, key2, computation, checkUse, checkStore)
参数
cache(单位:千美元)Map<K0, Map<K1, Map<K2, T>>>(中文(简体) )key0(单位:千美元)K0(中文(简体) )key1(单位:千美元)K1(中文(简体) )key2(单位:千美元)K2(中文(简体) )computation(单位:千美元)() => T(中文(简体) )checkUse(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )checkStore(单位:千美元)((t: T) => boolean) | undefined(中文(简体) )
回返
T。 。 。 .
groupBy(arr, key)
参数
arr(单位:千美元)Array<T>(中文(简体) )key(单位:千美元)(i: T) => K(中文(简体) )
回返
{[P in K]: Array<T>}。 。 。 .
hexToFractionalOpaqueRgba(hex)
将十六进制转换为分数 RGBA, 并将透明度设置为 1
参数
hex(单位:千美元)string(中文(简体) )- 十六进制字符串, 如“ # 0033ffcc ”
回返
小数RGB,e([number, number, number, number].g. [0, 0.2, 1, 1] (中文(简体) )
hexToFractionalRgb(hex)
将十六进制转换为分数 RGB
参数
hex(单位:千美元)string(中文(简体) )- 十六进制字符串, 如“ # 0033ff ”
回返
小数RGB,e([number, number, number]. g. [0, 0.2, 1] (中文(简体) )
hexToFractionalRgba(hex)
将十六进制转换为分数 RGBA
参数
hex(单位:千美元)string(中文(简体) )- 十六进制字符串, 如“ # 0033ff ”
回返
小数RGB,e([number, number, number, number].g. [0, 0.2, 1, 1] (中文(简体) )
hexToOpaqueRgba(hex)
将 HEX 转换为 RGB, 并将透明度设置为 255
参数
hex(单位:千美元)string(中文(简体) )- HEX 字符串, 例如 '# 0033ffcc'
回返
RGB, e (中文(简体) )[number, number, number, number].g. [0、51、255、255] (中文(简体) )
hexToRgb(hex)
将 HEX 转换为 RGB
参数
hex(单位:千美元)string(中文(简体) )- HEX 字符串, 例如 '# 0033ff'
回返
RGB, e (中文(简体) )[number, number, number]. g. [0, 51, 255] (中文(简体) )
hexToRgba(hex)
将 HEX 转换为 RGB
参数
hex(单位:千美元)string(中文(简体) )- HEX 字符串, 例如 '# 0033ffff'
回返
RGB, e (中文(简体) )[number, number, number, number].g. [0、51、255、255] (中文(简体) )
intersectBboxes(bbox0, bbox1)
参数
bbox0(单位:千美元)[number, number, number, number](中文(简体) )bbox1(单位:千美元)[number, number, number, number](中文(简体) )
回返
Bbox | undefined。 。 。 .
invertPoint(point)
参数
point(单位:千美元)[number, number](中文(简体) )
回返
[number, number]。 。 。 .
invertPoints(points)
参数
points(单位:千美元)Array<Point>(中文(简体) )
回返
Array<Point>。 。 。 .
isClosed(input)
参数
input(单位:千美元)Array<Point>(中文(简体) )
回返
boolean。 。 。 .
isEqualArray(array0, array1, isEqualObject)
参数
array0(单位:千美元)Array<T>(中文(简体) )array1(单位:千美元)Array<T>(中文(简体) )isEqualObject(单位:千美元)((t0: T, t1: T) => boolean) | undefined(中文(简体) )
回返
boolean。 。 。 .
isEqualPoint(point0, point1)
参数
point0(单位:千美元)[number, number](中文(简体) )point1(单位:千美元)[number, number](中文(简体) )
回返
boolean。 。 。 .
isEqualPointArray(pointArray0, pointArray1)
参数
pointArray0(单位:千美元)Array<Point>(中文(简体) )pointArray1(单位:千美元)Array<Point>(中文(简体) )
回返
boolean。 。 。 .
isEqualPointArrayArray(pointArrayArray0, pointArrayArray1)
参数
pointArrayArray0(单位:千美元)Array<Array<Point>>(中文(简体) )pointArrayArray1(单位:千美元)Array<Array<Point>>(中文(简体) )
回返
boolean。 。 。 .
isGeojsonGeometry(obj)
参数
obj(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isGeojsonLineString(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isGeojsonMultiGeometry(obj)
参数
obj(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isGeojsonMultiLineString(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isGeojsonMultiPoint(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isGeojsonMultiPolygon(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isGeojsonPoint(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isGeojsonPolygon(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isGeometry(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isLineString(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isMultiLineString(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isMultiPoint(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isMultiPolygon(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isPoint(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isPolygon(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isRing(input)
参数
input(单位:千美元)unknown(中文(简体) )
回返
boolean。 。 。 .
isSvgCircle(input)
参数
input(单位:千美元)any(中文(简体) )
回返
boolean。 。 。 .
isSvgLine(input)
参数
input(单位:千美元)any(中文(简体) )
回返
boolean。 。 。 .
isSvgPolyLine(input)
参数
input(单位:千美元)any(中文(简体) )
回返
boolean。 。 。 .
isSvgPolygon(input)
参数
input(单位:千美元)any(中文(简体) )
回返
boolean。 。 。 .
isSvgRect(input)
参数
input(单位:千美元)any(中文(简体) )
回返
boolean。 。 。 .
isValidHttpUrl(string)
参数
string(单位:千美元)string(中文(简体) )
回返
boolean。 。 。 .
lineAngle(line)
参数
line(单位:千美元)[Point, Point](中文(简体) )
回返
number。 。 。 .
lineStringToGeojsonLineString(lineString)
参数
lineString(单位:千美元)Array<Point>(中文(简体) )
回返
{type: 'LineString'; coordinates: number[][]}。 。 。 .
lineStringToLines(lineString)
参数
lineString(单位:千美元)Array<Point>(中文(简体) )
回返
Array<Line>。 。 。 .
linesIntersectionPoint(line0, line1, options)
参数
line0(单位:千美元)[Point, Point](中文(简体) )line1(单位:千美元)[Point, Point](中文(简体) )options?(单位:千美元)Partial<IntersectionOptions> | undefined(中文(简体) )
回返
Point | undefined。 。 。 .
mapToResourceMaskSvgPolygon(map)
参数
map(单位:千美元){ '@context'?: "https://schemas.allmaps.org/map/2/context.json" | undefined; type: "GeoreferencedMap"; id?: string | undefined; created?: string | undefined; modified?: string | undefined; ... 5 more ...; _allmaps?: unknown; }(中文(简体) )
回返
{type: 'polygon'; attributes?: SvgAttributes; coordinates: Ring}。 。 。 .
mergeGeojsonFeaturesCollections(geojsonFeatureCollections)
参数
geojsonFeatureCollections(单位:千美元)Array<GeojsonFeatureCollection>(中文(简体) )
回返
{type: 'FeatureCollection'; features: GeojsonFeature[]}。 。 。 .
mergeOptions(baseOptions, additionalPartialOptions)
参数
baseOptions(单位:千美元)T(中文(简体) )additionalPartialOptions(单位:千美元)U[0](中文(简体) )
回返
T & U[number]。 。 。 .
mergeOptionsUnlessUndefined(baseOptions, additionalOptions)
参数
baseOptions(单位:千美元)T(中文(简体) )additionalOptions(单位:千美元)Partial<U> | undefined(中文(简体) )
回返
T & Partial<U>。 。 。 .
mergePartialOptions(partialOptions)
参数
partialOptions(单位:千美元)U[0](中文(简体) )
回返
{[P in keyof U[number]]?: U[number][P] | undefined}。 。 。 .
mergeTwoOptionsUnlessUndefined(baseOptions, additionalOption)
参数
baseOptions(单位:千美元)T(中文(简体) )additionalOption(单位:千美元)Partial<U> | undefined(中文(简体) )
回返
T & Partial<U>。 。 。 .
midPoint(points)
参数
points(单位:千美元)[number, number](中文(简体) )
回返
[number, number]。 。 。 .
mixLineStrings(lineString0, lineString1, t)
参数
lineString0(单位:千美元)Array<Point>(中文(简体) )lineString1(单位:千美元)Array<Point>(中文(简体) )t(单位:千美元)number(中文(简体) )
回返
Array<Point>。 。 。 .
mixNumbers(number0, number1, t)
参数
number0(单位:千美元)number(中文(简体) )number1(单位:千美元)number(中文(简体) )t(单位:千美元)number(中文(简体) )
回返
number。 。 。 .
mixPoints(point0, point1, t)
参数
point0(单位:千美元)[number, number](中文(简体) )point1(单位:千美元)[number, number](中文(简体) )t(单位:千美元)number(中文(简体) )
回返
[number, number]。 。 。 .
multiLineStringToGeojsonMultiLineString(multiLineString)
参数
multiLineString(单位:千美元)Array<Array<Point>>(中文(简体) )
回返
{type: 'MultiLineString'; coordinates: number[][][]}。 。 。 .
multiPointToGeojsonMultiPoint(multiPoint)
参数
multiPoint(单位:千美元)Array<Point>(中文(简体) )
回返
{type: 'MultiPoint'; coordinates: number[][]}。 。 。 .
multiPolygonToGeojsonMultiPolygon(multiPolygon, close)
参数
multiPolygon(单位:千美元)Array<Array<Array<Point>>>(中文(简体) )close(单位:千美元)boolean | undefined(中文(简体) )
回返
{type: 'MultiPolygon'; coordinates: number[][][][]}。 。 。 .
multiplyArrayMatrix(arrayMatrix, factor)
参数
arrayMatrix(单位:千美元)Array<Array<number>>(中文(简体) )factor(单位:千美元)number(中文(简体) )
回返
Array<Array<number>>。 。 。 .
newArrayMatrix(rows, cols, value)
创建并填充 ArrayMatrix : 一组矩阵, 日后可以装入为 ml- matrix 矩阵
参数
rows(单位:千美元)number(中文(简体) )cols(单位:千美元)number(中文(简体) )value(单位:千美元)T | undefined(中文(简体) )
回返
Array<Array<T>>。 。 。 .
newBlockArrayMatrix(blocks, emptyValue)
参数
blocks(单位:千美元)Array<Array<Array<Array<T>>>>(中文(简体) )emptyValue(单位:千美元)T | undefined(中文(简体) )
回返
Array<Array<T>>。 。 。 .
objectDifference(newObject, baseObject, objectKeysPossiblyChanged)
参数
newObject(单位:千美元)object(中文(简体) )baseObject(单位:千美元)object(中文(简体) )objectKeysPossiblyChanged?(单位:千美元)Array<string> | undefined(中文(简体) )
回返
object。 。 。 .
omit(object, keys)
参数
object(单位:千美元)T(中文(简体) )keys(单位:千美元)Array<K>(中文(简体) )
回返
{[P in Exclude<keyof T, K>]: T[P]}。 。 。 .
optionKeysByMapIdToUndefinedOptionsByMapId(optionKeysByMapId)
参数
optionKeysByMapId(单位:千美元)Map<string, T> | undefined(中文(简体) )
回返
Map<string, Record<T[number], undefined>> | undefined。 。 。 .
optionKeysToUndefinedOptions(optionKeys)
参数
optionKeys(单位:千美元)T | undefined(中文(简体) )
回返
Record<T[number], undefined> | undefined。 。 。 .
pasteArrayMatrix(arrayMatrix, rowsStart, colsStart, subArrayMatrix)
参数
arrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )rowsStart(单位:千美元)number(中文(简体) )colsStart(单位:千美元)number(中文(简体) )subArrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )
回返
Array<Array<T>>。 。 。 .
pasteArrayMatrixInPlace(arrayMatrix, rowsStart, colsStart, subArrayMatrix)
参数
arrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )rowsStart(单位:千美元)number(中文(简体) )colsStart(单位:千美元)number(中文(简体) )subArrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )
回返
Array<Array<T>>。 。 。 .
pixelToIntArrayIndex(pixel, size, channels, flipY)
参数
pixel(单位:千美元)[number, number](中文(简体) )size(单位:千美元)[number, number](中文(简体) )channels(单位:千美元)number(中文(简体) )flipY(单位:千美元)boolean | undefined(中文(简体) )
回返
number。 。 。 .
pointInBbox(point, bbox)
参数
point(单位:千美元)[number, number](中文(简体) )bbox(单位:千美元)[number, number, number, number](中文(简体) )
回返
boolean。 。 。 .
pointToGeojsonPoint(point)
参数
point(单位:千美元)[number, number](中文(简体) )
回返
{type: 'Point'; coordinates: number[]}。 。 。 .
pointToPixel(point, translate)
参数
point(单位:千美元)[number, number](中文(简体) )translate(单位:千美元)Point | undefined(中文(简体) )
回返
[number, number]。 。 。 .
pointsAndPointsToLines(points0, points1)
参数
points0(单位:千美元)Array<Point>(中文(简体) )points1(单位:千美元)Array<Point>(中文(简体) )
回返
Array<Line>。 。 。 .
polygonIsBboxRectangle(polygon)
参数
polygon(单位:千美元)Array<Array<Point>>(中文(简体) )
回返
boolean。 。 。 .
polygonSelfIntersectionPoints(polygon, options)
参数
polygon(单位:千美元)Array<Array<Point>>(中文(简体) )options?(单位:千美元)Partial<IntersectionOptions> | undefined(中文(简体) )
回返
Array<Point>。 。 。 .
polygonToGeojsonPolygon(polygon, close)
参数
polygon(单位:千美元)Array<Array<Point>>(中文(简体) )close(单位:千美元)boolean | undefined(中文(简体) )
回返
{type: 'Polygon'; coordinates: number[][][]}。 。 。 .
prolongedLinesIntersectionPoint(line0, line1)
参数
line0(单位:千美元)[Point, Point](中文(简体) )line1(单位:千美元)[Point, Point](中文(简体) )
回返
Point | undefined。 。 。 .
radiansToDegrees(radians)
参数
radians(单位:千美元)number(中文(简体) )
回返
number。 。 。 .
rectangleToSize(rectangle)
参数
rectangle(单位:千美元)[Point, Point, Point, Point](中文(简体) )
回返
[number, number]。 。 。 .
rectanglesToScale(rectangle0, rectangle1, fit)
参数
rectangle0(单位:千美元)[Point, Point, Point, Point](中文(简体) )rectangle1(单位:千美元)[Point, Point, Point, Point](中文(简体) )fit?(单位:千美元)Fit | undefined(中文(简体) )
回返
number。 。 。 .
removeUndefinedOptions(optionsArray)
参数
optionsArray(单位:千美元)U[0](中文(简体) )
回返
{ [P in keyof {[K in keyof U[number]]: Exclude<U[number][K], undefined>}]?: {[K in keyof U[number]]: Exclude<U[number][K], undefined>}[P] | undefined }。 。 。 .
rgbToHex(rgb)
将 RBG 转换为 HEX
参数
rgb(单位:千美元)[number, number, number](中文(简体) )- RGB 色彩阵列, 例如 [0, 51, 255]
回返
HEX 字符串, e (string. g. '#0033ff' (中文(简体) )
rgbaToHex(rgba)
将 RBGA 转换为 HEX
参数
rgba(单位:千美元)[number, number, number, number](中文(简体) )
回返
HEX 字符串, e (string. g. '# 0033ffff' (中文(简体) )
ringIsBboxRectangle(ring)
参数
ring(单位:千美元)Array<Point>(中文(简体) )
回返
boolean。 。 。 .
ringToGeojsonPolygon(ring, close)
参数
ring(单位:千美元)Array<Point>(中文(简体) )close(单位:千美元)boolean | undefined(中文(简体) )
回返
{type: 'Polygon'; coordinates: number[][][]}。 。 。 .
rms(from, to)
参数
from(单位:千美元)Array<Point>(中文(简体) )to(单位:千美元)Array<Point>(中文(简体) )
回返
number。 。 。 .
rotateArray(array, offset)
参数
array(单位:千美元)Array<T>(中文(简体) )offset(单位:千美元)number(中文(简体) )
回返
Array<T>。 。 。 .
rotatePoint(point, angle, pivot, cosAngle, sinAngle)
参数
point(单位:千美元)[number, number](中文(简体) )angle(单位:千美元)number | undefined(中文(简体) )pivot(单位:千美元)Point | undefined(中文(简体) )cosAngle?(单位:千美元)number | undefined(中文(简体) )sinAngle?(单位:千美元)number | undefined(中文(简体) )
回返
[number, number]。 。 。 .
rotatePoints(points, angle, pivot)
参数
points(单位:千美元)Array<Point>(中文(简体) )angle(单位:千美元)number | undefined(中文(简体) )pivot(单位:千美元)Point | undefined(中文(简体) )
回返
Array<Point>。 。 。 .
scaleBbox(bbox, scale)
参数
bbox(单位:千美元)[number, number, number, number](中文(简体) )scale(单位:千美元)number(中文(简体) )
回返
[number, number, number, number]。 。 。 .
scalePoint(point, scale)
参数
point(单位:千美元)[number, number](中文(简体) )scale(单位:千美元)number(中文(简体) )
回返
[number, number]。 。 。 .
scalePoints(points, scale)
参数
points(单位:千美元)Array<Point>(中文(简体) )scale(单位:千美元)number(中文(简体) )
回返
Array<Point>。 。 。 .
scaleSize(size, scale)
参数
size(单位:千美元)[number, number](中文(简体) )scale(单位:千美元)number(中文(简体) )
回返
[number, number]。 。 。 .
shallowCopyArrayMatrix(arrayMatrix)
参数
arrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )
回返
Array<Array<T>>。 。 。 .
sizeToBbox(size, center)
参数
size(单位:千美元)[number, number](中文(简体) )center?(单位:千美元)Point | undefined(中文(简体) )
回返
[number, number, number, number]。 。 。 .
sizeToCenter(size)
参数
size(单位:千美元)[number, number](中文(简体) )
回返
[number, number]。 。 。 .
sizeToRectangle(size, center)
参数
size(单位:千美元)[number, number](中文(简体) )center?(单位:千美元)Point | undefined(中文(简体) )
回返
[Point, Point, Point, Point]。 。 。 .
sizeToResolution(size)
参数
size(单位:千美元)[number, number](中文(简体) )
回返
number。 。 。 .
sizesToScale(size0, size1, fit)
从两个大小计算一个比例尺
对于未说明的“ fit” , 比例尺是根据大小产生的表面积来计算的.
用于指定的“ fit ” :
平方矩形 bbox0 '*' 和 bbox1' 示例 :
'cain' 其中'*'包含' (在第一个尺寸0中相对较宽)
****
* *
. .
- . * (中文(简体) ). . . * * 翻译: 页:1
盖' *'被'所覆盖 (在第一个尺寸0中相对较宽)
....
. .
.. . . . . 所出所出所出所出所出所出所出所出所出所出所出 .. . . . . . . .. .
“ 相等 ” , 其中“ * ” 与“ ” 相同 (在第一个尺寸0中相对较宽)
**** ....
。 。 。 ..。 。 。 . .** (中文(简体) ). .* (中文(简体) ) 。 。 。 . . . .. 。 。 。 .. . * (中文(简体) ). .** (中文(简体) ). ****.
参数
size0(单位:千美元)[number, number](中文(简体) )- 第一个大小
size1(单位:千美元)[number, number](中文(简体) )- 第二个大小
fit?(单位:千美元)Fit | undefined(中文(简体) )- 合适的
回返
number。 。 。 .
sliceArrayMatrix(arrayMatrix, rowsStart, colsStart, rowsEnd, colsEnd)
参数
arrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )rowsStart(单位:千美元)number(中文(简体) )colsStart(单位:千美元)number(中文(简体) )rowsEnd?(单位:千美元)number | undefined(中文(简体) )colsEnd?(单位:千美元)number | undefined(中文(简体) )
回返
Array<Array<T>>。 。 。 .
squaredDistance(from, to)
参数
from(单位:千美元)[number, number](中文(简体) )to(单位:千美元)Point | undefined(中文(简体) )
回返
number。 。 。 .
stepDistanceAngle(point, dist, angle)
参数
point(单位:千美元)[number, number](中文(简体) )dist(单位:千美元)number(中文(简体) )angle(单位:千美元)number(中文(简体) )
回返
[number, number]。 。 。 .
stringToSvgGeometriesGenerator(svg)
参数
svg(单位:千美元)string(中文(简体) )
回返
Generator<SvgGeometry, void, unknown>。 。 。 .
subArrayMatrix(arrayMatrix, rows, cols)
参数
arrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )rows(单位:千美元)Array<number>(中文(简体) )cols(单位:千美元)Array<number>(中文(简体) )
回返
Array<Array<T>>。 。 。 .
subSetArray(arr1, arr2)
参数
arr1(单位:千美元)Array<T>(中文(简体) )arr2(单位:千美元)Array<T>(中文(简体) )
回返
boolean。 。 。 .
svgGeometriesToSvgString(geometries)
参数
geometries(单位:千美元)Array<SvgGeometry>(中文(简体) )
回返
string。 。 。 .
svgGeometryToGeometry(svgCircle)
参数
svgCircle(单位:千美元){type: 'circle'; attributes?: SvgAttributes; coordinates: Point}(中文(简体) )
回返
[number, number]。 。 。 .
svgGeometryToString(geometry)
参数
geometry(单位:千美元)SvgCircle | SvgLine | SvgPolyLine | SvgPolygon | SvgRect(中文(简体) )
回返
string。 。 。 .
threePointsToAngle(pointA, pointB, pointC)
由 B 和 C 点在 A 点 下生成的回角α
参数
pointA(单位:千美元)[number, number](中文(简体) )pointB(单位:千美元)[number, number](中文(简体) )pointC(单位:千美元)[number, number](中文(简体) )
回返
number。 。 。 .
translatePoint(point, translationPoint, addOrSubstract)
参数
point(单位:千美元)[number, number](中文(简体) )translationPoint(单位:千美元)[number, number](中文(简体) )addOrSubstract(单位:千美元)'add' | 'substract' | undefined(中文(简体) )
回返
[number, number]。 。 。 .
translatePoints(points, point, addOrSubstract)
参数
points(单位:千美元)Array<Point>(中文(简体) )point(单位:千美元)[number, number](中文(简体) )addOrSubstract(单位:千美元)'add' | 'substract' | undefined(中文(简体) )
回返
Array<Point>。 。 。 .
transposeArrayMatrix(arrayMatrix)
参数
arrayMatrix(单位:千美元)Array<Array<T>>(中文(简体) )
回返
Array<Array<T>>。 。 。 .
triangleAngles(triangle)
参数
triangle(单位:千美元)[Point, Point, Point](中文(简体) )
回返
[number, number, number]。 。 。 .
triangleArea(triangle)
参数
triangle(单位:千美元)[Point, Point, Point](中文(简体) )
回返
number。 。 。 .
uncloseMultiPolygon(multiPolygon)
参数
multiPolygon(单位:千美元)Array<Array<Array<Point>>>(中文(简体) )
回返
Array<Array<Array<Point>>>。 。 。 .
unclosePolygon(polygon)
参数
polygon(单位:千美元)Array<Array<Point>>(中文(简体) )
回返
Array<Array<Point>>。 。 。 .
uncloseRing(ring)
参数
ring(单位:千美元)Array<Point>(中文(简体) )
回返
Array<Point>。 。 。 .