leaflet.js plugin leaflet-easyPrint and markercluster styles

المشرف العام

Administrator
طاقم الإدارة
leaflet-easyPrint is a great plugin, as for the moment is the only one that plots all layers and markers I need.

But I also need to visualize clustered markers, so I am using markerCluster plugin. The problem when printing is that these clusters are not styled, just the text inside the cluster is plotted.

I changed easyPrint.css as follows (here just a piece of code), but only 'font' parameter is correctly visualized on printing, background-color has no effect. Thanks in advance.

@media print {.marker-cluster-small {background-color: rgba(181, 226, 140, 0.6);}.marker-cluster-small div {background-color: rgba(110, 204, 57, 0.6);}.marker-cluster {background-clip: padding-box;border-radius: 20px;}.marker-cluster div {background-color: rgb(240, 194, 12);width: 30px;height: 30px;margin-left: 5px;margin-top: 5px;text-align: center;border-radius: 17px;font: 30px "Helvetica Neue", Arial, Helvetica, sans-serif;}.marker-cluster span {line-height: 30px;color: #4889F2;}}I changed all 'background-color' to HEX color, getting a white circle (which is not the HEX color I specified) around the number of points in the cluster, so at least user can better localize these clusters. In any case, it would be nice to have another background color... any idea?



أكثر...
 
أعلى