I am writing with reference to an earlier question of mine, which also had to do with the use of Where clauses for Fusion Table Layer in Google Maps. Link to earlier question. I have noticed that if the Where clause in Styles section has more than one filtering conditions in it, it is ignored altogether. Google Map/Fusion Tables Layers then ends up applying that Style to ALL of the features contained in that Fusion table. You can remove a filtering condition from the Where clause to make it a single filter where clause, and it then works as expected so I am pretty sure that it doesn't like multiple filtering condition in the SAME where clause (or the way I am writing it).
Here is an example that illustrates this behavior:
layer = new google.maps.FusionTablesLayer({
map: map,
options: {
templateId: 2
},
heatmap: { enabled: false },
query: {
select: "geometry",
from: "1D6d93-0iT2zUCw8IvkbpDPYDx2-jA0ZAWXi07mQD",
},
styles: [{
//note multiple filters in the same Where clause.
where: "((SHIFT_ID != 1) AND (SHIFT_ID != 2))",
//you'd expect the following Style option applied to only those map features
//which met above criteria. However, they are applied to ALL map features.
polylineOptions: {
strokeOpacity: 0.70,
strokeColor: "#FFFFFF",
strokeWeight: "5" }
//if Where clause is reduced to just having one filter, it works fine.
//For example, either of the following two work fine by themselves.
//where: "SHIFT_ID != 1" --OR--
//where: "SHIFT_ID != 2" etc.
}]
});
Geocodezip was right; query was invalid.
This is what I have been able to determine re use of queries for Fusion Tables.
https://developers.google.com/fusiontables/docs/v2/sql-reference