I just made and Ajax callback that has three categories to simbolizesymbolize my geojsonGeoJSON. It works:
var geojson = new L.geoJson(data, {
style: function (feature) {
var c;
switch (feature.properties.dpv_cal) {
case 'Natural':
c = '#ffffff';
break;
case 'Mejorada':
c = '#db6adb';
break;
case 'Pavimentada':
c = '#ff0127';
break;
default:
c = 'grey';
}
return {color: c, opacity: 1, weight: 2};
}
}).addTo(map);