Fusion table suppressInfoWindows 不工作
Fusion table suppressInfoWindows not working
我对 suppressInfoWindows 有疑问,当在地图选项中声明时,它似乎无法在我的地图上运行。任何想法
function updateLayerQuery(layer, sector, county) {
var where = "Sector = '" + sector + "'";
if (county) {
where += " AND County = '" + county + "'";
}
layer.setOptions({
query: {
select: 'geometry',
from: '1xeq1_MLccx-A2spFLz_nc35xQwsBZNhwgGnUn1wY',
where: where,
suppressInfoWindows: true
}
CodePen 上的完整代码http://codepen.io/PiotrKrosniak/pen/VaEbBa
suppressInfoWindows
是 FusionTableLayersOptions object, not the FusionTablesQuery 对象的 属性。
function updateLayerQuery(layer, sector, county) {
var where = "Sector = '" + sector + "'";
if (county) {
where += " AND County = '" + county + "'";
}
layer.setOptions({
suppressInfoWindows: true, // should be here
query: {
select: 'geometry',
from: '1xeq1_MLccx-A2spFLz_nc35xQwsBZNhwgGnUn1wY',
where: where,
}
我对 suppressInfoWindows 有疑问,当在地图选项中声明时,它似乎无法在我的地图上运行。任何想法
function updateLayerQuery(layer, sector, county) {
var where = "Sector = '" + sector + "'";
if (county) {
where += " AND County = '" + county + "'";
}
layer.setOptions({
query: {
select: 'geometry',
from: '1xeq1_MLccx-A2spFLz_nc35xQwsBZNhwgGnUn1wY',
where: where,
suppressInfoWindows: true
}
CodePen 上的完整代码http://codepen.io/PiotrKrosniak/pen/VaEbBa
suppressInfoWindows
是 FusionTableLayersOptions object, not the FusionTablesQuery 对象的 属性。
function updateLayerQuery(layer, sector, county) {
var where = "Sector = '" + sector + "'";
if (county) {
where += " AND County = '" + county + "'";
}
layer.setOptions({
suppressInfoWindows: true, // should be here
query: {
select: 'geometry',
from: '1xeq1_MLccx-A2spFLz_nc35xQwsBZNhwgGnUn1wY',
where: where,
}