2 つのフュージョン テーブル レイヤーを含む Google マップがあります。1 つはマーカーで、もう 1 つはポリゴンです。スタイリングなしで両方のレイヤーを表示すると、それらが表示されます。マーカーのスタイルを設定すると、両方が表示されます。しかし、ポリゴンのスタイルを設定しようとすると、マーカーが表示されません。私はアイデアがありません。
// Initialize the first layer
var firstLayer = new google.maps.FusionTablesLayer({
query: {
select: "'geometry'",
from: '1eiyhdpl-5xnO7-csWgdrxxYHgFWRLjN0JADIX9o'
},
styles: [{
where: "'ABORTIONS' < 100",
polygonOptions: {
fillColor: '#cc0000',
fillOpacity: 0.2
}
},{
where: "'ABORTIONS' > 100 AND 'ABORTIONS' < 1000",
polygonOptions: {
fillColor: '#cc0000',
fillOpacity: 0.4
}
},{
where: "'ABORTIONS' > 1000 AND 'ABORTIONS' < 10000",
polygonOptions: {
fillColor: '#cc0000',
fillOpacity: 0.6
}
},{
where: "'ABORTIONS' > 10000 AND 'ABORTIONS' < 100000",
polygonOptions: {
fillColor: '#cc0000',
fillOpacity: 0.8
}
}],
map: map,
suppressInfoWindows: true
});
// Initialize the second layer
var secondLayer = new google.maps.FusionTablesLayer({
query: {
select: "'address'",
from: '1j7ogamqx3pXfiG0Eh1Ah0givle_thZE-OBgvQho'
},
styles: [{
where: "rank = 1",
markerOptions: {
iconName: 'small_green'
}
},{
where: "rank = 0",
markerOptions: {
iconName: 'small_blue'
}
}],
map: map,
suppressInfoWindows: true
});
firstlayer のスタイルを削除またはコメントすると、secondlayer のスタイル付きマーカーが表示されます。それらは、firstlayer のデフォルトの赤いポリゴンの上にあります。firstlayer スタイルでは、secondlayer のマーカーが消えます。
ありがとう!