【问题标题】:Google Maps MarkerClusterer ignores several styling propertiesGoogle Maps MarkerClusterer 忽略了几个样式属性
【发布时间】:2014-05-11 00:44:45
【问题描述】:

我正在使用 Google Maps MarkerClusterer 对地图标记进行聚类(谁会想到!)。我遇到的问题是,某些样式属性不会影响标记。

这里列出了所有可以使用的属性http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/docs/reference.html

heighttextSizetextColorurlwidth 属性可以正常工作。但是当试图改变fontWeight 时,什么也没有发生。我已经用这些属性进行了尝试。

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

}]];

但仍然没有任何变化。还有其他人有同样的问题吗?

【问题讨论】:

标签: javascript css google-maps google-maps-api-3 markerclusterer


【解决方案1】:

在文档中它说 fontWeight 值必须是一个字符串,但您发送的是一个数字。可以试试fontWeight: '100'吗?

【讨论】:

  • 试过了,fontWeight: 'normal' 也试过了,但也没有用。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-02-26
  • 2022-10-04
  • 1970-01-01
  • 2013-06-21
  • 1970-01-01
  • 2022-10-24
  • 2011-05-06
相关资源
最近更新 更多