2

是否可以仅在传单标记簇上编辑字体及其大小?不改变主图标?

在那种情况下,我必须把线放在哪里?

var clusterGroup = L.markerClusterGroup();
{

function estiloIcon(feature, latlng) {
    return L.marker(latlng, {
        icon: myIcon
    })
};
var geojsonLayer = new L.geoJson(geo, {
    pointToLayer: estiloIcon

})

clusterGroup.addLayer(geojsonLayer); 
}
map.addLayer(clusterGroup);
}
4

1 回答 1

0

所以我已经在“MasterCluster.Default.css”的档案中找到了答案在文件的底部有修改字体的行

    @font-face {
    font-family: 'freesans'; /*a name to be used later*/
    src: url('./freesansbold.ttf'); /*URL to font*/
}
.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
    }
.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;

    text-align: center;
    border-radius: 15px;
    font: 16px "freesans", Arial, Helvetica, sans-serif;
    text-shadow: 1px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
    }

这是编辑的行

于 2018-01-04T17:13:42.997 回答