Fusion tables dynamic maps strokeOpacity

情到浓时终转凉″ 提交于 2019-12-11 17:57:40

问题


I have tweaked this example for my map:

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

But i want the opacity of the border to be 0 (so nobody sees it). I guess i have to do something in this peace of code with strokeOpacity: 0.0, but I can't get it to work

  // 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
        }
      });
    }

回答1:


Did you look at PolygonOptions

This seems to be the best you can do:

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

example

UPDATE: Looks like strokeOpacity: 0.0 doesn't work; try something really small, like 0.0001.




回答2:


You have to set it to 1% ie:

strokeOpacity: 0.01



来源:https://stackoverflow.com/questions/14004656/fusion-tables-dynamic-maps-strokeopacity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!