How do i customize layer labels from a MapImageLayer? current layer code below
var resultsLabelLayer = new MapImageLayer({
url: url,
sublayers: [{
id: 1,
labelsVisible: true,
visible: true,
labelingInfo: [{
labelExpression: "[CONST]",
labelPlacement: "always-horizontal",
symbol: new TextSymbol({
color: [ 255,255,255,1 ],
font: {
size: 16,
weight: "bolder"
}
})
}]
}]
});
map.add(resultsLabelLayer);
Using this and adding the layer to the map yields no labels or the layer being drawn
Solved! Go to Solution.
True worth a try, I will look into turning this on.
Turns out that does the trick, after consulting the manager and enabling this feature. Thanks for your advice I would not have picked that up from the examples myself.
It would be nice if the sample told you that this was a required setting for your service to work.
When did the MapImageLayer object become available in the JS API (version)?
Since 4.2 I assume
Guys,
I´m using 4.15 version.
I´m trying to show the server-side labels on the view but only works with FeatureLayer. But I need to show sublayers on the menu widget, that´s why I have to use MapImageLayer.
There is no problem with my code because I can see the layer in the view. Supported Dynamic Layers = true and put ID on MapImageLayer as well. Checked hundreds of times. I tried what you guys said.
Anyone have a clue? Is that the 4.15 version to old for MapImageLayer?
Can anyone help? Thanks!