Module: ol/source/StadiaMaps

ol/source/StadiaMaps


Classes

StadiaMaps

Type Definitions

Options{Object}

Properties:
Name Type Description
cacheSize number | undefined

已弃用。 请改用图层上的 cacheSize 选项。

interpolate boolean
(defaults to true)

重采样时是否使用插值。默认情况下, 重采样时使用线性插值。设置为 false 可使用 the nearest neighbor instead.

layer string

图层名称。有效值为:alidade_smooth、alidade_smooth_dark、outdoors、stamen_terrain、stamen_terrain_background、stamen_terrain_labels、stamen_terrain_lines、stamen_toner_background、stamen_toner、stamen_toner_labels、stamen_toner_lines、stamen_toner_lite、stamen_watercolor 和 osm_bright。

minZoom number | undefined

最小缩放。

maxZoom number | undefined

最大缩放级别。

reprojectionErrorThreshold number
(defaults to 0.5)

允许的最大重投影误差(以像素为单位)。 值越高可以提高重投影性能,但会降低精度。

tileLoad函数 Load函数 | undefined

给定 URL 加载瓦片的可选函数。默认为

function(imageTile, src) {
  imageTile.getImage().src = src;
};
transition number
(defaults to 250)

渲染的不透明度过渡持续时间。要禁用不透明度过渡,请传递 transition: 0。

url string | undefined

URL 模板。必须包含 {x}、{y} 或 {-y},以及 {z} 占位符。

wrapX boolean
(defaults to true)

是否水平环绕世界。

zDirection number | NearestDirection函数
(defaults to 0)

选择在整数缩放级别之间使用更高还是更低缩放级别的瓦片。参见 getZForResolution。

apiKey string | undefined

Stadia Maps API 密钥。localhost 或大多数公共 Web 部署不需要。详见 https://docs.stadiamaps.com/authentication/。

retina boolean | undefined

使用视网膜瓦片(如果可用;Stamen Watercolor 不支持)。