@ allmaps/ 类型
所有地图类型Script类型
几何类型
以下内容: 地貌图 默认使用 Allmaps 软件包.
type Point = [number, number]
type LineString = Point[]
type Polygon = Point[][]
// A Polygon is an array of rings of at least three points
// Rings are not closed: the first point is not repeated at the end.
// There is no requirement on winding order.
type MultiPoint = Point[]
// Notice that this is equivalent to the LineString type, hence the `isMultiGeometry` option
type MultiLineString = Point[][]
// Notice that this is equivalent to the Polygon type, hence the `isMultiGeometry` option
type MultiPolygon = Point[][][]
type Geometry =
| Point
| LineString
| Polygon
| MultiPoint
| MultiLineString
| MultiPolygon
为了与外部数据互动,还使用了以下类型:
GeoJSON 地产 跟着 GeoJSON 规格。 。 。 .
SVG 地产 使用下列类型表示(但注意有些函数允许 svg 作为字符串传递):
export type SvgCircle = {
type: 'circle'
attributes?: SvgAttributes
coordinates: Point
}
export type SvgLine = {
type: 'line'
attributes?: SvgAttributes
coordinates: [Point, Point]
}
export type SvgPolyLine = {
type: 'polyline'
attributes?: SvgAttributes
coordinates: Point[]
}
export type SvgPolygon = {
type: 'polygon'
attributes?: SvgAttributes
coordinates: Point[]
}
export type SvgRect = {
type: 'rect'
attributes?: SvgAttributes
coordinates: Point[]
}
export type SvgGeometry =
| SvgCircle
| SvgLine
| SvgPolyLine
| SvgPolygon
| SvgRect
API 密码
Bbox
纸箱 ([number, number, number, number]。定义为 [xmin, ymin, xMax, yMax]
Color
类型
[number, number, number]
ColorCount
字段
color(单位:千美元)[number, number, number](中文(简体) )count(单位:千美元)number(中文(简体) )
ColorWithTransparancy
类型
[number, number, number, number]
FetchFn
类型
(
input: Request | string | URL,
init?: RequestInit
) => Promise<Response>
Fit
两种矩形(或一般形状)可以重叠的方法:(或)'contain' | 'cover' | 'equal') (中文(简体) ).
- "夹": 第一个包含第二个
- "封面": 第一个是第二个
- “ 平等 ” : 第一个和第二个大小相同
Gcp
字段
geo(单位:千美元)[number, number](中文(简体) )resource(单位:千美元)[number, number](中文(简体) )
GeojsonFeature
字段
geometry(单位:千美元)| GeojsonLineString | GeojsonMultiLineString | GeojsonMultiPoint | GeojsonMultiPolygon | GeojsonPoint | GeojsonPolygon(中文(简体) )properties(单位:千美元)unknown(中文(简体) )type(单位:千美元)'Feature'(中文(简体) )
GeojsonFeatureCollection
字段
features(单位:千美元)Array<GeojsonFeature>(中文(简体) )type(单位:千美元)'FeatureCollection'(中文(简体) )
GeojsonGeometry
类型
| GeojsonLineString
| GeojsonMultiLineString
| GeojsonMultiPoint
| GeojsonMultiPolygon
| GeojsonPoint
| GeojsonPolygon
GeojsonGeometryType
类型
| 'LineString'
| 'MultiLineString'
| 'MultiPoint'
| 'MultiPolygon'
| 'Point'
| 'Polygon'
GeojsonLineString
字段
coordinates(单位:千美元)Array<Array<number>>(中文(简体) )type(单位:千美元)'LineString'(中文(简体) )
GeojsonMultiGeometry
类型
GeojsonMultiLineString | GeojsonMultiPoint | GeojsonMultiPolygon
GeojsonMultiLineString
字段
coordinates(单位:千美元)Array<Array<Array<number>>>(中文(简体) )type(单位:千美元)'MultiLineString'(中文(简体) )
GeojsonMultiPoint
字段
coordinates(单位:千美元)Array<Array<number>>(中文(简体) )type(单位:千美元)'MultiPoint'(中文(简体) )
GeojsonMultiPolygon
字段
coordinates(单位:千美元)Array<Array<Array<Array<number>>>>(中文(简体) )type(单位:千美元)'MultiPolygon'(中文(简体) )
GeojsonPoint
字段
coordinates(单位:千美元)Array<number>(中文(简体) )type(单位:千美元)'Point'(中文(简体) )
GeojsonPolygon
字段
coordinates(单位:千美元)Array<Array<Array<number>>>(中文(简体) )type(单位:千美元)'Polygon'(中文(简体) )
Geometry
类型
LineString | MultiLineString | MultiPoint | MultiPolygon | Point | Polygon
Histogram
字段
[bin: string](单位:千美元){count: number; color: Color}(中文(简体) )
HomogeneousTransform
2D 同位变换矩阵的重量阵列
这些系数在多处使用顺序相同
- CSS Transform由2D矩阵定义. 使用
toString()用于 CSS 输入前matrix()函数. - WebGL 二维变换矩阵.
- OpenLayers的变身课.
见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-函数/matrix 互联网档案馆的存檔,存档日期2013-12-22 见: https://openlayers.org/en/latest/apidoc/module-ol transform.html 页面存档备份,存于互联网档案馆
注意: Polynomial1变换的权重阵列有不同的顺序. 参见相应的转换功能.
类型
[number, number, number, number, number, number]
ImageRequest
字段
region?(单位:千美元){x: number; y: number; width: number; height: number}(中文(简体) )size?(单位:千美元){width: number; height: number}(中文(简体) )
Line
类型
[Point, Point]
LineString
类型
Array<Point>
Matrix4
类型
[
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number
]
MultiGeometryOptions
字段
isMultiGeometry(单位:千美元)boolean(中文(简体) )
MultiLineString
类型
Array<Array<Point>>
MultiPoint
类型
Array<Point>
MultiPolygon
类型
Array<Array<Array<Point>>>
Point
类型
[number, number]
Polygon
类型
Array<Array<Point>>
Rectangle
矩形(或可能为四边形) ([Point, Point, Point, Point]) (中文(简体) ). 风起起分相自在.
Region
字段
height(单位:千美元)number(中文(简体) )width(单位:千美元)number(中文(简体) )x(单位:千美元)number(中文(简体) )y(单位:千美元)number(中文(简体) )
Ring
环为 [[number, number], ...] (单位:千美元)Array<Point>) (中文(简体) ).
必须包含至少3个点 可能不包含重复点 必须是未关闭的: 最后一个元素不是重复第一个元素 可能不是自我交流 迄今没有关于自我交流的要求,尽管这在今后可能有用 迄今为止,没有关于整风令的要求。 这只有在导出到 GeoJSON 时才适用
Size
两个数字表示 Bbox 的大小为 [宽,高] 或 [xSize, ySize] ([number, number]) (中文(简体) ).
或者,两个数字表示数字的最小和最大,例如:
或者,两个数字表示矩阵的尺寸:行,相(这是不同的手性!)
SizeObject
字段
height(单位:千美元)number(中文(简体) )width(单位:千美元)number(中文(简体) )
SvgAttributes
类型
{[x: string]: string | number}
SvgCircle
字段
attributes?(单位:千美元){[x: string]: string | number}(中文(简体) )coordinates(单位:千美元)[number, number](中文(简体) )type(单位:千美元)'circle'(中文(简体) )
SvgGeometry
类型
SvgCircle | SvgLine | SvgPolyLine | SvgPolygon | SvgRect
SvgLine
字段
attributes?(单位:千美元){[x: string]: string | number}(中文(简体) )coordinates(单位:千美元)[Point, Point](中文(简体) )type(单位:千美元)'line'(中文(简体) )
SvgPolyLine
字段
attributes?(单位:千美元){[x: string]: string | number}(中文(简体) )coordinates(单位:千美元)Array<Point>(中文(简体) )type(单位:千美元)'polyline'(中文(简体) )
SvgPolygon
字段
attributes?(单位:千美元){[x: string]: string | number}(中文(简体) )coordinates(单位:千美元)Array<Point>(中文(简体) )type(单位:千美元)'polygon'(中文(简体) )
SvgRect
字段
attributes?(单位:千美元){[x: string]: string | number}(中文(简体) )coordinates(单位:千美元)Array<Point>(中文(简体) )type(单位:千美元)'rect'(中文(简体) )
Tile
字段
column(单位:千美元)number(中文(简体) )imageSize(单位:千美元)[number, number](中文(简体) )row(单位:千美元)number(中文(简体) )tileZoomLevel(单位:千美元){ scaleFactor: number width: number height: number originalWidth: number originalHeight: number columns: number rows: number }(中文(简体) )
TileByColumn
字段
[key: number](单位:千美元)[number, number](中文(简体) )
TileZoomLevel
字段
columns(单位:千美元)number(中文(简体) )height(单位:千美元)number(中文(简体) )originalHeight(单位:千美元)number(中文(简体) )originalWidth(单位:千美元)number(中文(简体) )rows(单位:千美元)number(中文(简体) )scaleFactor(单位:千美元)number(中文(简体) )width(单位:千美元)number(中文(简体) )
Triangle
三角形
作为 [[x0, y0], [x1, y1], [x2, y2]] (单位:千美元)[Point, Point, Point]) (中文(简体) ).
风起起分相自在.
TypedGeometry
类型
P | TypedLineString<P> | TypedMultiLineString<P> | TypedMultiPoint<P> | TypedMultiPolygon<P> | TypedPolygon<...>
TypedLine
类型
[P, P]
TypedLineString
类型
Array<P>
TypedMultiLineString
类型
Array<Array<P>>
TypedMultiPoint
类型
Array<P>
TypedMultiPolygon
类型
Array<Array<Array<P>>>
TypedPolygon
类型
Array<Array<P>>
TypedRectangle
类型
[P, P, P, P]
TypedRing
类型
Array<P>
TypedTriangle
类型
[P, P, P]