SkylineAnalysis
A spatial analysis object for skyline analysis, used to perform skyline analysis on a 3D scene.
Constructor
import { SkylineAnalysis } from '@maptalks/gl-layers';
const skylineAnalysis = new SkylineAnalysis({
lineColor: [1, 0, 0],
lineWidth: 1
});
skylineAnalysis.addTo(groupGLLayer);Details
- options* Object configuration options, the available options are as follows:
| Option | Type | Description | Default |
|---|---|---|---|
| lineColor | Number[] | A 3-component normalized array; the skyline outline color | [1, 0, 0] |
| lineWidth | Number | Outline line width | 1 |
Methods
exportSkylineMap(options)
Exports the skyline image (with a transparent background) and returns a dataURL (added after cross-checking the 2026 source code).
Parameters:
- options Object export options, possible properties: | Property | Type | Description | Default | | ------ | :----: | ---- | :-----------: | | save | Boolean | Whether to pop up the download dialog | false | | filename | String | Download file name | 'export' |
Returns:
- String dataURL (returns null when the analysis is not enabled)
Methods Inherited from Analysis
addTo(groupGLLayer)
Adds the analysis object to a GroupGLLayer.
Spatial analysis objects can only be added to a GroupGLLayer; they cannot be added to other WebGL layers.
Parameters:
- groupGLLayer GroupGLLayer the GroupGLLayer
Returns:
- this
remove()
Removes the spatial analysis object from the layer.
Returns:
- void
update(name, value)
Updates options data.
Parameters:
- name String the setting name
- value any the setting value
Returns:
- void
getAnalysisType()
Gets the type of the Analysis.
Returns:
- String
getDefines()
Internal method.
Returns the defines added to the shader when the Analysis is rendered.
Returns:
- Object
renderAnalysis(meshes)
Internal method.
Renders the spatial analysis scene (implemented by each analysis subclass) and returns the uniform variables required for rendering.
Parameters:
- meshes Mesh[] the scene meshes
Returns:
- Object
enable()
Enables the analysis.
Returns:
- void
disable()
Disables the analysis.
Returns:
- void
isEnable()
Whether the analysis is enabled.
Returns:
- Boolean
getExcludeLayers()
Gets the list of layer ids excluded from the analysis (these layers are ignored during the analysis).
Returns:
- String[]
setExcludeLayers(layerIds)
Sets the list of layer ids excluded from the analysis.
Parameters:
- layerIds String[] list of layer ids
Returns:
- void
exportAnalysisMap(meshes)
Exports the analysis result image (RGBA pixel data); returns null when the analysis is not enabled.
Parameters:
- meshes Mesh[] the scene meshes
Returns:
- Uint8Array
This document has been cross-checked against the @maptalks/gl-layers 2026 source (api-notes-others.md / api-notes-vt-gl.md)