Open FlashJunior opened 9 years ago
An better option would be to pass a whole string for the style.
Example:
{
style: 'font-family:Verdana, Geneva, sans-serif; font-size:15px; font-weight:normal; font-style:normal; color:#fff;',
width: 50,
height: 50,
url: '/media/img/yourclustericon.png'
}
instead of
{
fontFamily: 'Verdana, Geneva, sans-serif',
textSize: 15,
textColor: '#ffffff',
fontStyle: 'normal',
fontWeight: 'normal',
width: 50,
height: 50,
url: '/media/img/yourclustericon.png'
}
I agree with you
For me also a new option for css classes would be a huge advantage. Only top
and left
(lines 1235-1236) would be necessary for inline styling. The rest could then be styled Custom.
Ok, I pull two requests for this: usage example: https://github.com/googlemaps/js-marker-clusterer/pull/23 code changes: https://github.com/googlemaps/js-marker-clusterer/pull/24
Flash Junior's fix works perfectly
font-family and font-weight from Cluster are static. See: Line 1237
I added "fontFamily" and "fontWeight" in my Project (like http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/docs/reference.html#ClusterIconStyle).
My changed code snippets: