你好,加一个pointToLayer,以mark的形式进行展示,mark是可以改变图标的,
resultLayer = L.geoJSON(serviceResult.result.features, {
pointToLayer:function(fe,latlng){
return L.marker(latlng, {icon: L.icon({iconUrl:"图标地址"})
});
}
,
onEachFeature: function (feature, layer) {
layer.bindPopup(resources.text_capital+":" + feature.properties.CAPITAL);
}
}).addTo(map);