AnsweredAssumed Answered

Making additions to Pop-Ups in Campus Place Locator

Question asked by hlynur.ingolfsson on Jun 14, 2017

Hello (yet again).

 

So I am not being able to add media additions to the pop-up for Campus Place Locator.

I would like to be able to both add images that are linked via URL in an attribute in the EmployeeInfo-table as well as using external URL's added straight to the code.

 

Anyone can help me with how to make the additions to the following code to achieve this?

personQueryLayerInfo: {
url: 'https://services1.arcgis.com/LpQVI6wAjYbHDKAK/arcgis/rest/services/BuildingInterior/FeatureServer/4',
layerNum: 4,
addToMap: false,
oidField: 'OBJECTID',
relationshipId: 0, // this is a related table to the room layer
relationshipField: 'LOCATION', //queryRelated is not working - so specify the relationship Field
// it's important the fieldnames here are different from the fieldnames in the roomlayer's popup
popupFields: [
{fieldName: 'KNOWNAS', label: 'Employee Name'},
{fieldName: 'EMAIL', label: 'Email',
formatter: function(val) {
return '<a href="mailto:' + val + '">' + val + '</a>';
}
},
{fieldName: 'USERTYPE', label: 'Job Title'},
{fieldName: 'EXTENSION', label: 'Extension'},
{fieldName: 'COSTCTRN', label: 'Cost Center'},
{fieldName: 'LOCATION', label: 'Location'},

],
// the *first* one of these fields to be encountered will be used in the popup title
popupTitleField: ['KNOWNAS'],
popupTitlePriority: true, // popup will look for any fields above before it will look at the room layer
queryFields: ['KNOWNAS', 'LOCATION'],
queryLabelFields: ['KNOWNAS', 'LOCATION'],
queryLabelFunction: function(attrs) {
// 'this' = personQueryLayerInfo
return attrs.KNOWNAS + ' (' + attrs.LOCATION + ')';
},
queryIconClass: 'fa fa-user'
}

 

-Hlynur.

Outcomes