I'm using the ArcGIS Map API "Historic_National_Boundaries_NEW (FeatureServer) > Year_2000" present over here :
It has two pre-defined fields 'OBJECTID' and 'NAME_2' (for each country) which are displayed onclick of a country in map. I'm using PopupTemplate() object to create the popup.
//on-click popup functionality starts
var popupOptions = {
markerSymbol: new SimpleMarkerSymbol("circle", 32, null,
new Color([0, 0, 0, 0.25])),
marginLeft: "20",
marginTop: "20"
};
var popup = new Popup(popupOptions, domConstruct.create("div"));
var popupTemplate = new PopupTemplate({
title: "{NAME_2}",
fieldInfos: [
{
fieldName: "NAME_2",
visible: true,
label: "Country: ",
},
{
fieldName: "OBJECTID",
visible: true,
label: "ID: ",
}
],
showAttachments: true
});
I need to know if these fields can be customized or new fields can be added. I checked through the documentation but was not able to find any info. It mentioned adding fields, media elements and plain text but not external content or any method to manipulate the fields.
If fields cannot be manipulated, how can I display custom content (possibly fetched from JSON/XML file) in the popup for each country?