However, when I try it with angular-leaflet like this,
geojson.style = {
fillColor: getStyle, // getStyle does not get called.
weight: 2,
opacity: 1,
color: 'black',
};
function getStyle(f){
console.log(f); //f is undefined
}
I'm confused on how to pass the feature to the function. The geojson feature in my case has properties like count which i use to pick appropriate color. Thanks.
I've got a geojson file of US states. I want to generate a heatmap like visualization by painting each of these features differently. I've done it before (without angular) by implementing something like this: http://gis.stackexchange.com/questions/75590/setstyle-function-for-geojson-features-leaflet
However, when I try it with angular-leaflet like this,
I'm confused on how to pass the feature to the function. The geojson feature in my case has properties like count which i use to pick appropriate color. Thanks.