Code Bunny Code Bunny - 26 days ago 4x
Javascript Question

Query for Fusion Tables doesn't work on Google Maps JS API v3

I am trying to query a fusion tables and display it on my google maps app with cordova.

My problem is that the queries I send are not recognized and the whole table is returned no matter what I put in 'where' constraints.

query: {
select: 'Koordinat',
from: '1xkSyi8Wew5jBU4CCk1dKNaFS6UEd4bz0_gdkhXhC',
where: "Ikon = '6'"

I tried changing the field type between number and text and tried using double and single quotes it the where clause, yet it simply displays all rows on the map.

The fiddle is as follows:


The problem is that this query is not valid

where: 'Ikon = 1 OR Ikon = 4 OR Ikon = 5 OR Ikon = 8 OR Ikon = 10 OR Ikon = 11 OR Ikon = 12',

See Row and Query SQL Reference:

"OR is not supported. (If you are looking for OR, consider the IN operator. It will do the trick in certain queries)".

So it should be

where: 'Ikon IN (1, 4, 5, 8, 10, 11, 12)',