Hi all
I have created a client side count statistic query , that is working fine. How I can place the
query = tLayer.createQuery();
query.groupByFieldsForStatistics = ["FLATS"];
query.outStatistics = [sumFlats];
tLayer.queryFeatures(query)
.then(function (response) {
response.features.forEach((feature) => {
console.log(feature.attributes);
});
tLayer.refresh();
});
Try something like this inside the query.
// Style the label
var labelClass = {
symbol: {
type: "text", // autocasts as new TextSymbol()
color:[254, 252, 203],
haloColor: "Black",
haloSize: 2,
lineWidth:55,
font: {
// autocast as new Font()
family: "Avenir Next LT Pro Medium",
size: 8,
weight: "bold"
}
},
labelExpressionInfo: {
expression: feature.attributes
},
labelPlacement: "always-horizontal",
//minScale: 7500
};
tLayer.labelingInfo = [labelClass];
tLayer.refresh()