<MapboxGL.RasterSource />
RasterSource is a map content source that supplies raster image tiles to be shown on the map.The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification.
栅格源是提供要在地图上显示的光栅图像分片的地图内容源。分片的位置和有关分片的元数据由选项字典或符合TileJSON规范的外部文件定义。
props
Prop | Type | Default | Required | Description |
---|---|---|---|---|
id | string |
MapboxGL. StyleSource. DefaultSourceID |
false |
A string that uniquely identifies the source. |
url | string |
none |
false |
A URL to a TileJSON configuration file describing the source’s contents and other metadata. 描述源内容和其他元数据的TileJSON配置文件的URL。 |
tileUrlTemplates | array |
none |
false |
An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints. Example: https://example.com/raster-tiles/{z}/{x}/{y}.png
|
minZoomLevel | number |
none |
false |
An unsigned integer that specifies the minimum zoom level at which to display tiles from the source. The value should be between 0 and 22, inclusive, and less than maxZoomLevel, if specified. The default value for this option is 0. |
maxZoomLevel | number |
none |
false |
An unsigned integer that specifies the maximum zoom level at which to display tiles from the source. The value should be between 0 and 22, inclusive, and less than minZoomLevel, if specified. The default value for this option is 22. |
tileSize | number |
none |
false |
Size of the map tiles. Mapbox urls default to 256, all others default to 512. |
tms | bool |
none |
false |
Influences the y direction of the tile coordinates. (tms inverts y axis) |
attribution | string |
none |
false |
An HTML or literal text string defining the buttons to be displayed in an action sheet when the source is part of a map view’s style and the map view’s attribution button is pressed. |
网友评论