I’m using Fusion Tables with about 300 polygons as a layer in Google Maps.
Everything works fine, but the ‘where’ clause in my code doesn’t seem to have any effect.
I tried to query Fusion Tables from my browser, which gave an error message about API key authentication. Enabled key authentication and it works fine from the browser but not with the code to display the map.
I’ve spent quite a lot of time reading through the Fusion Tables documentation and Google Maps documentation about Fusion Tables Layers but I can’t figure out how to give my API key as a parameter to google.maps.FusionTablesLayer.
var layer = new google.maps.FusionTablesLayer({
query: {
select: 'geometry',
from: '1-O2W25MX7ggxdxlvZ2Ac6uTeXJ8kWUUUrUS_i10',
where: 'name = Antwerp'
}
});
layer.setMap(map);
Your where clause is incorrect. It should be where “name = ‘Antwerp'”
using the obsolete query format:
http://www.geocodezip.com/v3_FusionTablesLayer_linktoA.html?lat=51.270033&lng=4.271934&zoom=10&type=m&tableid=5373211&tablequery=SELECT%20geometry%20FROM%205373211%20WHERE%20name%20%3D%20%27Antwerp%27