I just started using Javascript but I guess I have to integrate something in this part of my code where I loop through all the csv data:
var points = L.geoCsv(null, {
fieldSeparator: '\t',
onEachFeature: function (feature, layer) {
var popup = '';
for (var clave in feature.properties) {
var title = points.getPropertyTitle(clave);
popup += '<b>'+title+'</b><br />'+feature.properties[clave]+'<br /><br />';
}
layer.bindPopup(popup).bindLabel(feature.properties[points.getPropertyName('SiteID')], {noHide: true});
},
pointToLayer: function (feature, latlng) {
return L.marker(latlng, {
icon:myicon
});
},
firstLineTitles: true
});