I am currently using the leaflet geoCSV plugin to bring through CSV data into the map frame.
I am struggling to be able to customise the popup to only show certain attributes of the CSV and different titles. Using the Bankias Example the popup currently uses the script below to pull through all of the attributes using the titles within the CSV.
var popup = '';
for (var clave in feature.properties) {
var title = bankias.getPropertyTitle(clave);
popup += '<b>'+title+'</b><br />'+feature.properties[clave]+'<br /><br />';
}
layer.bindPopup(popup);
The issue I have is that I cannot change the titles within the CSV as they are exported from a database so I therefore need to manually change them in the script above.
Using the Bankias example would it be possible to only show the "Localidad" and "Provincia" attributes and change the titles to "locality" and "province" without having to change them in the CSV?