layer~VectorTileCustomizedLayer(name, url, options)

自定义矢量瓦片图层。用来对接空间信息服务平台发布的自定义矢量瓦片服务,适用于一次性加载大量矢量要素的场景。自定义矢量瓦片中数据图层对应空间信息服务平台数据自定义矢量瓦片预处理阶段配置的矢量数据集。其中点状、线状、面状数据集下,每一行设置都对应一个数据图层。返回的数据格式是PBF,相对于GeoJSON格式的数据更加高效,作为VectorTileJSONLayer的替代方案推荐使用。

Summary

Methods:

Constructor

new VectorTileCustomizedLayer(name, url, options)

Parameters:
Name Type Description
name String

自定义矢量瓦片图层的名称。

url String

自定义矢量瓦片的服务地址。

options Object
Name Type Description
dataFormat String

切片格式,栅格切片支持"pbf"|"json",默认为'pbf'

Example
//自定义矢量瓦片服务地址
const serviceUrl="https://hmap.hikvision.com.cn/hmappublish/service/rs/v1/vector_tile/geojson_tile/hmapdemo_xihu_geojsontile/";
//自定义矢量瓦片的样式地址,style.json为入口文件,其同级需包含字体样式和图标样式
const styleUrl="../public/style/hvj/style.json";
let layer = new hmap.layer.VectorTileCustomizedLayer('geojsonTile', serviceUrl, {
    styleUrl: styleUrl
});

Members

clampToGround

设置贴地状态

Overrides:

depthTest

获取图层的深度测试属性
return {Boolean} 深度测试属性

Overrides:

Methods