0

我已经为我的地图调整了这个例子:

https://developers.google.com/fusiontables/docs/samples/dynamic_styling_template

但我希望边界的不透明度为 0(所以没有人看到它)。我想我必须用 strokeOpacity: 0.0 做一些代码和平的事情,但我无法让它工作

  // Apply the style to the layer & generate corresponding legend
  function applyStyle(map, layer, column) {
    var columnStyle = COLUMN_STYLES[column];
    var styles = [];

    for (var i in columnStyle) {
      var style = columnStyle[i];
      styles.push({
        where: generateWhere(column, style.min, style.max),
        polygonOptions: {
          fillColor: style.color,
          fillOpacity: style.opacity ? style.opacity : 0.8
        }
      });
    }
4

2 回答 2

0

您必须将其设置为 1%,即:

中风不透明度:0.01

于 2013-01-02T05:35:25.137 回答
0

你看过PolygonOptions

这似乎是你能做的最好的:

 strokeOpacity: 0.0001,
 strokeWeight: 0,
 strokeColor: style.color,

例子

更新:看起来 strokeOpacity: 0.0 不起作用;尝试一些非常小的东西,比如 0.0001。

于 2012-12-22T19:25:03.820 回答