我有一个有两层的谷歌地图:
1 - 融合层
2 - 天气层
问题是,在融合出现的地方,天气层不再可见。所以基本上,我想要一个 css z-index 属性,在顶部显示天气
到目前为止我的代码:
$(function() {
window.table_id = "abc";
window.map = new google.maps.Map(document.getElementById("map-canvas"), {
center: new google.maps.LatLng(31.056091682584327, -96.01576748461912),
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
google.initializeWeather();
return google.initializeFusion();
});
google.initializeFusion = function() {
google.maps.visualRefresh = true;
return window.fusionLayer = new google.maps.FusionTablesLayer({
map: window.map,
heatmap: {
enabled: false
},
query: {
select: "col2",
from: "abc",
where: ""
},
options: {
styleId: 2,
templateId: 2
}
});
};
google.initializeWeather = function() {
var cloudLayer, weatherLayer;
weatherLayer = new google.maps.weather.WeatherLayer({
map: window.map,
temperatureUnits: google.maps.weather.TemperatureUnit.FAHRENHEIT
});
cloudLayer = new google.maps.weather.CloudLayer();
return cloudLayer.setMap(window.map);
};
谢谢你的时间!