MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / layerCreateFcuntion

Method layerCreateFcuntion

src/common/mapping/WebMapV2.js:1785–1813  ·  view source on GitHub ↗
({
        type,
        sourceID,
        layerID,
        parentLayerId,
        beforeId,
        style,
        minzoom,
        maxzoom,
        filter
      })

Source from the content-addressed store, hash-verified

1783
1784 const visible = layerInfo.visible;
1785 const layerCreateFcuntion = ({
1786 type,
1787 sourceID,
1788 layerID,
1789 parentLayerId,
1790 beforeId,
1791 style,
1792 minzoom,
1793 maxzoom,
1794 filter
1795 }) => {
1796 const layerStyle = {
1797 style: this._transformStyleToMapBoxGl({ ...style }, type),
1798 layout: {
1799 visibility: visible
1800 }
1801 };
1802 this._addOverlayToMap({
1803 type,
1804 source: sourceID,
1805 layerID,
1806 parentLayerId,
1807 beforeId,
1808 layerStyle,
1809 minzoom,
1810 maxzoom,
1811 filter
1812 });
1813 };
1814 if (['POLYGON', 'LINE'].includes(type)) {
1815 // linedash不能用表达式处理,需用多个图层
1816 const lineDashExpression = expressionMap.lineDash;

Callers

nothing calls this directly

Calls 2

_addOverlayToMapMethod · 0.95

Tested by

no test coverage detected