Sorry, but I am fairly new to some of this. I see the
var plyr;
array.some(this.map.graphicsLayerIds, lang.hitch(this, function (layerId) {
var lyr = this.map.getLayer(layerId);
if(lyr.name === "Search Results: Parcels"){
plyr = lyr;
return true;
}
}));
if(plyr){
var xppins = "", obj, cTextElements = [];
array.map(plyr.graphics, lang.hitch(this, function(gra, index){
if (plyr.graphics.length === 1){
obj = {OwnerName: "Owner Name: " + gra.attributes.NAME};
cTextElements.push(obj);
obj = {PPIN: "PPIN: " + gra.attributes.PPIN};
cTextElements.push(obj);
obj = {ParcelNum: "Parcel Number: " + gra.attributes.PARCEL_NUMBER};
cTextElements.push(obj);
obj = {StreetAdd: "Street Address: " + gra.attributes.STREET_ADDRESS};
cTextElements.push(obj);
}else if (plyr.graphics.length > 1){
if (xppins === ""){
xppins = gra.attributes.PPIN;
} else {
if([7,16,25,34,43,52,61,70,79,88,97].indexOf(index) > -1){
xppins = xppins + ",\r\n" + gra.attributes.PPIN;
}else{
xppins = xppins + ", " + gra.attributes.PPIN;
}
}
obj = {OwnerName: "Selected PPINs: " + xppins};
cTextElements.push(obj);
}
template.layoutOptions.customTextElements = cTextElements;
}));
}
not sure what I can remove or keep.