It turns out that in angular-leaflet-directive_v0.7.6 there is no "pointToLayer" for the geojson data, added "pointToLayer:geojson.pointToLayer"
eg angular-leaflet-directive
//...
geojson.options = {
style: geojson.style,
onEachFeature: onEachFeature,
pointToLayer:geojson.pointToLayer
};
It turns out that v0.8 has this feature
e.g. adding the icon
var myIcon = { iconUrl:'images/mapPinRed.png',
iconSize:[25, 25],
iconAnchor:[12, 0]})
};
angular.extend($scope, {
geojson: {
data:data,
style:
function (feature) {return {};},
pointToLayer: function(feature, latlng) {
return new L.marker(latlng, {icon: L.icon(myIcon);
},
onEachFeature: function (feature, layer) {
layer.bindPopup("number: " +feature.properties.something);
}
} //geojson
});