1
2
3
4
const template = {
// NAME and COUNTY are fields in the service containing the Census Tract (NAME) and county of the featuretitle: "{NAME} in {COUNTY}",
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const template = {
// autocasts as new PopupTemplate()title: "{NAME} in {COUNTY}",
content: [
{
type: "fields",
fieldInfos: [
{
fieldName: "B12001_calc_pctMarriedE", // The field whose values you want to formatlabel: "Married %" },
{
fieldName: "B12001_calc_numMarriedE", // The field whose values you want to formatlabel: "People Married"format: {
digitSeparator: true, // Uses a comma separator in numbers >999places: 0// Sets the number of decimal places to 0 and rounds up }
},
{
fieldName: "B12001_calc_numNeverE", // The field whose values you want to formatlabel: "People that Never Married"format: {
digitSeparator: true, // Uses a comma separator in numbers >999places: 0// Sets the number of decimal places to 0 and rounds up }
},
{
fieldName: "B12001_calc_numDivorcedE", // The field whose values you want to formatlabel: "People Divorced"format: {
digitSeparator: true, // Uses a comma separator in numbers >999places: 0// Sets the number of decimal places to 0 and rounds up }
}
]
}
]
};