Looking at the GeoJson API here , this is not possible when creating the L.GeoJson layer for the icon . I believe you can search
The GeoJson sample page page on the Leaflet website shows this scenario. Look at the baseball player badge.
The icon is defined as follows:
var baseballIcon = L.icon({ iconUrl: 'baseball-marker.png', iconSize: [32, 37], iconAnchor: [16, 37], popupAnchor: [0, -28] });
The icon is applied to the L.geoJson layer through the pointToLayer parameter, which indicates the function; eg:
var coorsLayer = L.geoJson(coorsField, { pointToLayer: function (feature, latlng) { return L.marker(latlng, {icon: baseballIcon}); } })
This function will be called for each GeoJSON point. The function will return L.Marker , which uses the icon you specified.
So, to answer your question: Your block of code creating your layer should look like this:
var points = L.geoJson(labels, { pointToLayer: function (feature, latlng) { return L.marker(latlng, {icon: crossIcon }); } });
source share