当用户更改缩放级别时,我想重新加载 Fusion Tables 图层。可以看出,我尝试过但无法使其工作。
var map;
var layerl0;
function initialize() {
map=new google.maps.Map(document.getElementById('map_canvas'),{
center: new google.maps.LatLng(MyLat,MyLng),
zoom:4,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
layerl0 = new google.maps.FusionTablesLayer({
query: {
select: "'ColumnHeader'",
from: 'MyEncryptedId'
},
map: map
});
/* refresh after zooming */
google.maps.event.addListener(map, 'zoom_changed', function() {
layerl0.refresh();
});
}
google.maps.event.addDomListener(window, 'load', initialize);