我想在asp.net按钮点击事件上运行这个JavaScript函数。但是当我点击按钮时地图没有被加载。这是我的代码。请帮助我。
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false">
</script>
//这是我的 JavaScript 函数
<script type="text/javascript">
var map;
var layerl0;
function initializes()
{
map = new google.maps.Map(document.getElementById('map-canvas'), {
center: new google.maps.LatLng(16.003575733881323, 81.298828125),
zoom: 5,
mapTypeId: google.maps.MapTypeId.HYBRID
});
layerl0 = new google.maps.FusionTablesLayer({
query: {
select: "'geometry'",
from: '4757916',
where: "Address='kerala'"
},
map: map
});
}
</script>
// 这是asp.net代码
<body>
<form id="form1" runat="server">
<div>
<div>
<div id="map-canvas" style="height: 421px"></div>
</div>
<asp:Button ID="Button1" OnClientClick="initializes()" runat="server" Text="Button" />
</div>
</form>
</body>