Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/404.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Google Maps MarkerClusterer忽略了几个样式属性_Javascript_Css_Google Maps_Google Maps Api 3_Markerclusterer - Fatal编程技术网

Javascript Google Maps MarkerClusterer忽略了几个样式属性

Javascript Google Maps MarkerClusterer忽略了几个样式属性,javascript,css,google-maps,google-maps-api-3,markerclusterer,Javascript,Css,Google Maps,Google Maps Api 3,Markerclusterer,我正在使用谷歌地图标记聚类器对地图标记进行聚类(谁会想到呢!)。我遇到的问题是,某些样式属性不会影响标记 这里列出了所有可以使用的属性 属性height、textSize、textColor、url和width工作正常。但是当尝试更改fontwweight时,什么也没有发生。我用这些道具试过了 var styles = [[{ url: imagePath, width: x, height: y, anchor: [0, 0], textColor: '

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

这里列出了所有可以使用的属性

属性
height
textSize
textColor
url
width
工作正常。但是当尝试更改
fontwweight
时,什么也没有发生。我用这些道具试过了

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

}]];

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

文档中说fontWeight值必须是字符串,但您发送的是一个数字。你能试试
fontWeight:'100'

fontWeight:'normal'
一样试过,但都没用。我没问题,你能做一把小提琴吗?当然。我只是把“有趣”的东西贴在那里。希望足够了。