I have created dynamic feature layer and displaying in web application , the labels looks fine . When I click on custom print the labels are coming improper. The below image green area is dynamic feature layer added in BaseMap. Labels are showing very neatly and looks good .
When I click on custom Print tool the labels are not coming properly
Solved! Go to Solution.
Mohan,
What version of ArcGIS Server are you using? What print server are you using for the first image?
Robert,
I am using ArcGIS Server 10.5.1 . The first image is not the print image, its the WAB app page. Where I am creating a dynamic feature layer on the fly with labels. For labels, I am using "MultiLineTextSymbol.js" from https://github.com/suytt/esri.symbol.MultiLineTextSymbol to show the multiple labels below each other.
When I click print button, it seems, labels are not respecting the map scale, also with labels </br> is coming.
Mohan,
The ArcGIS Print service does not support custom symbols and that is why it looks the way it does in the print.
Robert,
There is a requirement to show multiple labels below each other as shown in first image. How can I achieve it without using custom symbols?
I am creating dynamic feature layer with labels using below code snippet -
var featureLayerOptions = {
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["*"],
infoTemplate: infoTemplate,
id: dynamicLayerID
};
this.dynamicFL = new FeatureLayer(hsFeatureCollection, featureLayerOptions);
var statesColor = new Color("#060606");
// create a text symbol to define the style of labels
var statesLabel = new TextSymbol().setColor(statesColor);
statesLabel.font.setSize("9pt");
statesLabel.font.setFamily("arial");
json = { "labelExpressionInfo": { "value": "{" + this.firstValueName +"}\n({" +this.secValueName+"})" };
var labelClass = new LabelClass(json);
labelClass.symbol = statesLabel; // symbol also can be set in LabelClass' json
this.dynamicFL.setLabelingInfo([labelClass]);
this.map.addLayer(this.dynamicFL);
Kindly suggest.
Mohan,
Currently you can not.