cmv/cmv-app

How to setLayerDefinitions for dynamic layer type on App load ?

mayur9785 opened this issue · 1 comments

Hi,

How to apply setLayerDefinitions for Dynamic layer on App load ?

Below is my dynamic layer in OperationalLayer :

{
            type: 'dynamic',
            url: 'http://myservice/arcgis/rest/services/BPDHC/GIS_Map_2019/MapServer',
            
            title: i18n.viewer.operationalLayers.dashboard,
            options: {
                id: 'dashboard',
                opacity: 1.0,
                visible: true,
                imageParameters: buildImageParameters({
                    layerIds: [0],
                    layerOption: 'show'
                }),
            },
            identifyLayerInfos: {
                returnFieldName: true
            },
            legendLayerInfos: {
                exclude: false
            },
            layerControlLayerInfos: {
                swipe: true,
                metadataUrl: true,
                expanded: true,
            }
        },

Thanks,

@mayur9785 This question has been asked before - IIRC you can do something like the solution mentioned in this answer:

#357 (comment)