<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Control_Options.aspx.cs"
Inherits="Samples.Controls.Control_Options" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>控件选项</title>
<style type="text/css">
#maps
{
height: 450px;
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=zh-CN"></script>
<script language="javascript" type="text/javascript">
//地图初始化函数
function initialize() {
var Options = {
zoom: 4,
center: new google.maps.LatLng(-33, 151),
mapTypeControl: true,
mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU }, //MapType控件以下拉列表形式展现
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL //导航控件以迷你显示展现
},
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("maps"), Options); //创建地图实例
}
google.maps.event.addDomListener(window, "load", initialize); //将地图初始化函数绑定到window的load事件
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="maps">
</div>
</form>
</body>
</html>