native-point render plugin
Draws point data using the native point drawing mechanism.
Configuration
{
// [必填] 渲染插件对象
renderPlugin: {
// [必填] 插件类型,固定为line
type: "native-point",
// [必填] 数据配置
dataConfig: {
// [必填] 数据类型,固定为native-point
type: "native-point",
// [可选] 默认为false
// 声明是否只包含2D数据。
// 设为true时,VectorTileLayer会开启瓦片的模板测试(stencil test),
// 剪切掉超过瓦片范围的数据,消除绘制时瓦片重叠部分的绘制问题
only2D: true
},
// [可选] 默认为null
// 渲染场景配置
sceneConfig: {
// [Optional] Default: "one"
// The src parameter of the WebGL blendEquation; possible values:
// 0, 1, "src color", "one minus src color", "src alpha", "one minus dst color", "dst alpha",
// "one minus dst alpha", "constant color", "one minus constant color", "constant alpha",
// "one minus constant alpha", "src alpha saturate"
blendSrc: "one",
// [Optional] Default: "one minus src alpha"
// The dst parameter of the WebGL blendEquation; possible values:
// 0, 1, "src color", "one minus src color", "src alpha", "one minus dst color", "dst alpha",
// "one minus dst alpha", "constant color", "one minus constant color", "constant alpha",
// "one minus constant alpha", "src alpha saturate"
blendDst: "one minus src alpha",
// [Optional] Default: [0, 1]
// The WebGL depth value range
depthRange: [0, 1],
// [Optional] Default: null
// A feature-filter expression; data matching the condition will not be rendered
excludes: null
// [可选] 默认为always,即永远显示
// WebGL深度测试函数,可选的值有 always, never, <, <=, !=, >, >=
depthFunc: 'always',
}
},
// [可选] 默认为true
// 数据过滤条件
filter: true,
// 样式属性
symbol: {
markerType: 'circle',
markerFill: '#f00',
markerSize: 2,
markerOpacity: 1
}
}For more on the filter data filtering conditions, see feature-filter.
Supported data types
- For vector tile data, Features with a type of Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygon are supported
- For GeoJSON data, Features with a type of Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygon are supported
- For vector layers, maptalks.Marker, maptalks.MultiPoint, maptalks.LineString, maptalks.MultiLineString, maptalks.Polygon, maptalks.MultiPolygon are supported.
Dynamic styles
Most style properties support function-type expressions, allowing different style values to be set based on the zoom level or data property values.
For example, the following makes the icon size increase with the map zoom level:
{
"markerSize": {
"stops": [[1, 2], [20, 10]]
}
}Supported Symbol style properties
markerType
Default: square
String — the point type. Options: square, circle.
markerSize
Default: 10
Note: per the 2026 source code, the default value is 10 (NativePointPainter DEFAULT_UNIFORMS.markerSize); the old documentation wrote 1.
Number — the point size. The valid range is determined by the platform, and native point sizes may vary across platforms.
markerFill
Default: #000
String | Number[] — the point color, either a css color value or a normalized four-element array.
markerOpacity
Default: 1
Number — point opacity, range 0-1.
This document has been cross-checked against the @maptalks/gl-layers 2026 source code (api-notes-vt-gl.md)