http://jsbin.com/hinekaj/edit?html,output
this is a link to a map am working on. It will be great if someone could help me to hide the attributes that have "null" as their value. I am aware that I need to use the IF command but have been struggling with it.
onEachFeature: function (feature, layer) {
layer.bindPopup('Address: '+ feature.properties.address
+ 'Sample 1: '+ feature.properties.sample_1 + ' Pb'
+ "Sample 1: "+ feature.properties.sample_1 + ' Pb'
+ " , Sample 2: "+ feature.properties.sample_2 + ' Pb'
+ "Sample 3: "+ feature.properties.sample_3 + ' Pb'
+ " , Sample 4: "+ feature.properties.sample_4 + ' Pb'
+ 'Sample 5: '+ feature.properties.sample_5 + ' Pb'
+ ' , Sample 6: '+ feature.properties.sample_6 + ' Pb'
+ 'Sample 7: '+ feature.properties.sample_7 + ' Pb'
+ ' , Sample 8: '+ feature.properties.sample_8 + ' Pb'
+ 'Sample 9: '+ feature.properties.sample_9 + ' Pb'
+ ' , Sample 10: '+ feature.properties.sample_10 + ' Pb'
+ 'Sample 11: '+ feature.properties.sample_11 + ' Pb'
+ ' , Sample 12: '+ feature.properties.sample_12 + ' Pb'
+ 'Sample 13: '+ feature.properties.sample_13 + ' Pb'
+ ' , Sample 14: '+ feature.properties.sample_14 + ' Pb'
);
},
No comments:
Post a Comment