Javascript 图例与地图上的颜色不对应。融合表
我正在使用fusion tables API设置贴图样式。但是,在图例中,一些国家(乌干达和莫桑比克)未显示图例中显示的正确颜色 下面是显示图例的代码Javascript 图例与地图上的颜色不对应。融合表,javascript,css,google-fusion-tables,Javascript,Css,Google Fusion Tables,我正在使用fusion tables API设置贴图样式。但是,在图例中,一些国家(乌干达和莫桑比克)未显示图例中显示的正确颜色 下面是显示图例的代码 <style type="text/css"> #legend { background-color: #FFF; margin: 10px; padding: 5px; width: 150px; } #legend p { font-weight: bold;
<style type="text/css">
#legend {
background-color: #FFF;
margin: 10px;
padding: 5px;
width: 150px;
}
#legend p {
font-weight: bold;
margin-top: 3px;
}
#legend div {
clear: both;
}
.color {
height: 12px;
width: 12px;
margin-right: 3px;
float: left;
display: block;
}
#map-canvas{
width: 700px;
height: 650px;
}
</style>
列
“总点数”
已设置为类型Text
,比较将基于不会给出预期结果的字符串
简单测试:
alert('9'>'10');//true
alert(9>10);//false
解决方案:将列的类型设置为Number
alert('9'>'10');//true
alert(9>10);//false