I'm trying to apply multiple styles to a Google Fusion Table Layer.
This works and colors all polygons that are in an array to the blue color:
layer = new google.maps.FusionTablesLayer({
map : map,
query : {
select : "geometry",
from : "1gwSN6n_00uZ7YuAP7g4FiUiilybqDRlRmWJrpvA"
},
styles: [{
polygonOptions:
{
fillColor: "#ffffff",
strokeColor: "#bcbcbc",
fillOpacity: ".75"
}
},
{
where: whereClause,
polygonOptions: {
fillColor: "#0D58A6"
}
}
]
});
layer.setMap(map);
But this doesn't work -- no polygons even appear on my map:
layer = new google.maps.FusionTablesLayer({
map : map,
query : {
select : "geometry",
from : "1gwSN6n_00uZ7YuAP7g4FiUiilybqDRlRmWJrpvA"
},
styles: [{
polygonOptions:
{
fillColor: "#ffffff",
strokeColor: "#bcbcbc",
fillOpacity: ".75"
}
},
{
where: whereClause,
polygonOptions: {
fillColor: "#0D58A6"
}
}
,
{
where: whereClause,
polygonOptions: {
fillColor: "#ff0000"
}
}
]
});
layer.setMap(map);
Never mind that I'm coloring the same thing one color and then another--I just want the second style to work. When I take out the second style, all is fine. I put in the second style--and no polygons any more.
Can someone tell me what I'm doing wrong, please?