Google Maps Fusiontable查询where子句显示“数据可能仍在加载” [英] Google Maps Fusiontable query where clause shows "data may still be loading"
问题描述
代码是:
<!DOCTYPE html>
< html>
< head>
< meta charset =utf-8/>
< title> map< / title>
< / head>
< body>
< div id =map-canvasstyle =height:500px>< / div>
< script src =https://maps.googleapis.com/maps/api/js?sensor=false>< / script>
< script>
函数initialize(){
var sloCenter = new google.maps.LatLng(46.119944,14.815333);
var map = new google.maps.Map(document.getElementById('map-canvas'),{zoom:8,center:sloCenter});
$ b var layerLUO = new google.maps.FusionTablesLayer({
query:{
select:'graphics',
from:'1bcKOFVL1kfjLOHGTXibbKzGN-4_Xvy_mj73iteY',
其中:LUO_ID = 51//如果您对此行进行注释,则为LUO_ID为Number类型,51为此列的有效数据
},
options:{
styleId :2
},
map:map
});
}
google.maps.event.addDomListener(window,'load',initialize);
< / script>
< / body>
< / html>
您可以在 https://www.google.com/fusiontables/DataSource?docid=1bcKOFVL1kfjLOHGTXibbKzGN-4_Xvy_mj73iteY
过滤器在融合式GUI中工作。
有人可以解释问题所在吗?
根据我的经验,数据可能仍在加载意味着查询出现问题。
看起来像我LUO_ID列在名称的开始处有一个特殊字符(如果我将鼠标悬停在该ID上,我会在L之前看到一个框,该框似乎是 UTF-8字节顺序标记)。如果我使用col0,它可以工作(这是): I'm trying to filter some data in fusion tables and then show the result graphics. Code is: You can view the table at: https://www.google.com/fusiontables/DataSource?docid=1bcKOFVL1kfjLOHGTXibbKzGN-4_Xvy_mj73iteY Filter works in the fusiontable GUI. Can someone explain what the problem is? The "data may still be loading" in my experience means there is something wrong with the query. Looks to me like your LUO_ID column has a "special" character at the beginning of the name (If I hover over that ID I see a "box" right before the "L". That box seems to be a UTF-8 Byte Order Mark). If I use col0 instead it works (which is the URL you get if you click on "publish"): 这篇关于Google Maps Fusiontable查询where子句显示“数据可能仍在加载”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>map</title>
</head>
<body>
<div id="map-canvas" style="height:500px"></div>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
function initialize() {
var sloCenter = new google.maps.LatLng(46.119944, 14.815333);
var map = new google.maps.Map(document.getElementById('map-canvas'), { zoom: 8, center: sloCenter });
var layerLUO = new google.maps.FusionTablesLayer({
query: {
select: 'graphics',
from: '1bcKOFVL1kfjLOHGTXibbKzGN-4_Xvy_mj73iteY',
where: "LUO_ID = 51" //if you comment this line it works. LUO_ID is Number type and 51 is a valid data for this column
},
options: {
styleId: 2
},
map: map
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</body>
</html>