问题
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