Classes
Type Definitions
-
Config{Object}
-
Properties:
Name Type Description namestring | undefined 名称。
descriptionstring | undefined 描述。
versionstring | undefined 版本。
attributionstring | undefined 归属信息。
templatestring | undefined 模板。
legendstring | undefined 图例。
schemestring | undefined 方案。
tilesArray.<string> 瓦片 URL 模板。
gridsArray.<string> | undefined 可选网格。
minzoomnumber | undefined 最小缩放级别。
maxzoomnumber | undefined 最大缩放级别。
boundsArray.<number> | undefined 可选边界。
centerArray.<number> | undefined 可选中心。
-
Options{Object}
-
Properties:
Name Type Description attributionsAttributionLike | undefined 归属信息。
cacheSizenumber | undefined 已弃用。 请改用图层上的 cacheSize 选项。
crossOriginnull | string | undefined 已加载图像的 crossOrigin 属性。注意如果要使用 Canvas 渲染器访问像素数据,必须提供 crossOrigin 值。详见 https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image。 interpolateboolean
(defaults to true)重采样时是否使用插值。默认情况下, 重采样时使用线性插值。设置为 false 可使用 the nearest neighbor instead.
jsonpboolean
(defaults to false)使用带回调的 JSONP 加载 TileJSON。当服务器不支持 CORS 时有用。
reprojectionErrorThresholdnumber
(defaults to 0.5)允许的最大重投影误差(以像素为单位)。 值越高可以提高重投影性能,但会降低精度。
tileJSONConfig | undefined 此数据源的 TileJSON 配置。如果未提供,必须配置
url。tileLoad函数Load函数 | undefined 给定 URL 加载瓦片的可选函数。默认为
function(imageTile, src) { imageTile.getImage().src = src; };tileSizenumber | Size
(defaults to [256, 256])瓦片服务使用的瓦片尺寸。注意:
tileSize和其他非标准 TileJSON 属性当前被忽略。urlstring | undefined TileJSON 文件的 URL。如果未提供,必须配置
tileJSON。wrapXboolean
(defaults to true)是否水平环绕世界。
transitionnumber | undefined 渲染的不透明度过渡持续时间。要禁用不透明度过渡,请传递
transition: 0。zDirectionnumber | NearestDirection函数
(defaults to 0)选择在整数缩放级别之间使用更高还是更低缩放级别的瓦片。参见
getZForResolution。