Open andres-ss25 opened 3 years ago
Hola Andres,
There is nothing in the app to support this yet, but it's a good idea.
Within app.js there is a function configurePopup
which creates the table containing the key:value pairs. The function formatPopup
then calls formatValue
to format the value for decimal places, dates, text prefix, etc:
function formatValue(value, field){
// (summarised code)
// Given a value and a field definition, apply the appropriate formatting
// Used in the Query Widget and Identify functions
if (field.decimals !== undefined) {
value = round(value, field.decimals);
}
if (field.date !== undefined && value !== null){
...
var theDate = moment(new Date(value));
}
if (field.thousands !== undefined) {
value = addThousandsSeparator(value);
}
if (field.prefix !== undefined){
value = field.prefix + value;
}
return (value);
}
You could add a check here for image
and if so add the image source. (A hyperlink would also be useful here).
Unfortunately I won't have time to do this in the near future, but please feel free to submit a pull-request if you have the time to do this.
Cheers, Steve
Hello I have a Geo JSON that contains the path in the project of some images. How do I make the image appear in the brand's popup.