異なる条件に応じてレイヤー内の異なる色で国のポリゴンを着色しています。しかし、5 つの "where" 条件の後、関連する色が検出されませんでした。ただし、デフォルトの色を使用します。なぜこうなった?以下は私のコードです:
layer.setOptions({
query: {
select: 'masterNarrative, countryName',
from: tableId,
where: where
},
styles: [{
where: "masterNarrative= '72 virgins (houris)' ",
polygonOptions: {
fillColor: '#2daebf',
fillOpacity: 0.5
}
},
{
where: "masterNarrative= 'Badr' ",
polygonOptions: {
fillColor: '#e33100',
fillOpacity: 0.5
}
},
{
where: "masterNarrative= 'Crusaders/Colonization' ",
polygonOptions: {
fillColor: '#a9014b',
fillOpacity: 0.5
}
},
{
where: "masterNarrative= 'Nakba (Palestine)' ",
polygonOptions: {
fillColor: '#871F78',
fillOpacity: 0.5
}
},
{
where: "masterNarrative= 'Hypocrites (Munafiqun)' ",
polygonOptions: {
fillColor: '#ff5c00',
fillOpacity: 0.5
}
},
{
where: "masterNarrative= 'Mahdi' ",
polygonOptions: {
fillColor: '#ffb515',
fillOpacity: 0.5
}
},
{
where: "masterNarrative= 'Musaylimah' ",
polygonOptions: {
fillColor: '#34925E',
fillOpacity: 0.5
}
},
{
where: "masterNarrative= 'Pharaoh' ",
polygonOptions: {
fillColor: '#E066FF',
fillOpacity: 0.5
}
},
{
where: "masterNarrative= 'Puppet Master' ",
polygonOptions: {
fillColor: '#00FF00',
fillOpacity: 0.5
}
}]
});