我需要为每个FusionTableLayer应用样式,但是地图显示始终是第一层样式。怎么了?
var layer1 = new google.maps.FusionTablesLayer({
query: {
select: 'geometry',
from: 'Table1'
},
styles: [{
polygonOptions: {
strokeColor: "#FFFF00",
strokeOpacity: "0.7",
strokeWeight: "1",
fillColor: "#FF0000",
fillOpacity: "0.3"
}
}],
map: map
});
var layer2 = new google.maps.FusionTablesLayer({
query: {
select: 'county',
from: 'Table2'
},
styles:[{polygonOptions: {
strokeColor: "#FF0000",
strokeOpacity: "0.7",
strokeWeight: "1",
fillColor: "#000000",
fillOpacity: "0.0"
}}],
map: map
});
我尝试了几项但结果却相同。
答案 0 :(得分:0)
每个the documentation样式只能应用于每个地图的单个FusionTables图层:
融合表样式
注意:样式只能应用于每个地图的单个Fusion Tables图层。您最多可以在该图层上应用五种样式。