简体   繁体   English

Google Maps MarkerClusterer会忽略一些样式属性

[英]Google Maps MarkerClusterer ignores several styling properties

I'm using the Google Maps MarkerClusterer to cluster Map Markers ( Who would have thought! ). 我正在使用Google Maps MarkerClusterer对地图标记进行聚类(谁会想到的!)。 The problem I'm having is, that certain styling properties don't affect the marker. 我遇到的问题是某些样式属性不会影响标记。

Here's a list of all properteis that can be used http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/docs/reference.html 这是可以使用的所有属性的列表http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/docs/reference.html

The properties height , textSize , textColor , url , and width work without any problems. 属性heighttextSizetextColorurlwidth正常工作。 But when trying to change the fontWeight nothing happens. 但是,当尝试更改fontWeight什么也没有发生。 I've tried it out with these propteries. 我已经用这些道具试过了。

var styles = [[{
    url: imagePath,
    width: x,
    height: y,
    anchor: [0, 0],
    textColor: '#ffffff',
    textSize: 20,
    fontWeight: 100 // as well as `fontWeight: 'normal'`

}]];

But still there are no changes. 但是仍然没有变化。 Are there other people with the same issues? 还有其他人有同样的问题吗?

In documentation it says fontWeight value must be a string, but you're sending a number. 在文档中,它说fontWeight值必须是一个字符串,但是您要发送一个数字。 Can you try fontWeight: '100' ? 您可以尝试fontWeight: '100'吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM