MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / getLayerCatalogRenderLayers

Function getLayerCatalogRenderLayers

src/common/mapping/utils/util.js:207–214  ·  view source on GitHub ↗
(parts, catalogId, layersOnMap)

Source from the content-addressed store, hash-verified

205}
206
207export function getLayerCatalogRenderLayers(parts, catalogId, layersOnMap) {
208 // ms 3.0.5以下的版本 layerCatalogs layersContent/parts 不包括自身的上图layerid 只包含复合图层的id
209 const renderLayers = layersOnMap.some(item => item.id === catalogId) ? [catalogId] : [];
210 if (parts) {
211 renderLayers.push(...parts);
212 }
213 return Array.from(new Set(renderLayers)).filter(item => !!item);
214}
215
216export function getMainLayerFromCatalog(layerParts, catalogId, layersOnMap) {
217 const renderLayers = getLayerCatalogRenderLayers(layerParts, catalogId, layersOnMap);

Callers 4

_createSourceCatalogsMethod · 0.90
_generateLayersMethod · 0.90
getMainLayerFromCatalogFunction · 0.85

Calls 2

pushMethod · 0.80
filterMethod · 0.80

Tested by

no test coverage detected