Using labels/labelingInfo with MapImageLayer fails

804
0
07-09-2018 02:17 AM
KevinHaeni
New Contributor III

I have a MapImage Layer defined as follows:

this.layer = new MapImageLayer(this.mapServiceUrl, {
    outFields: ['VC_STAT_CODE', 'ID'],
    sublayers: [
        {
            id: 0,
            visible: true,
            popupTemplate: template,
            labelsVisible: true,
            labelingInfo: [{
                labelExpression: "[ID]",
                labelPlacement: "below-right",
                symbol: {
                    type: "text"// autocasts as new TextSymbol()
                    color: "white",
                    font: {
                        size: 8,
                    },
                    backgroundColor: [0, 0, 0, 0.5],
                },
                minScale: 0,
                maxScale: 0
            }]
        }],
});

It does work fine in development (ArcGIS Server 10.5.1), however, it fails in production (ArcGIS Server 10.5). The whole layer is not being load and we are getting the following error:

[esri.views.2d.layers.MapImageLayerView2D]

  1. {name: "dynamiclayer:getImageUrl-error", message: "Unable to create image url", details: {…}}
    1. message:"Unable to create image url"
    2. name:"dynamiclayer:getImageUrl-error"

As soon as I remove the labelingInfo and labelsVisible field, the layer is again being loaded (ofc without labels).

Is there any issue with labels and arcgis server 10.5?

The MapService/layers are the same on both our servers.

Tags (2)
0 Kudos
0 Replies