<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Overlay_Icon.aspx.cs" Inherits="Samples.Overlays.Overlay_Icon" %>
<!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 type="text/javascript" language="javascript">
//地图初始化函数
function initialize() {
var LatLng = new google.maps.LatLng(-25.363882, 131.044922);
var Options = {
zoom: 4, center: LatLng, mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("maps"), Options);
var image = "../images/nei_24.gif"; //图标图片地址
var LatLng = new google.maps.LatLng(-33.890542, 151.274856);
//创建图标
var beachMarker = new google.maps.Marker({
position: LatLng, map: map, icon: image, title: "悉尼"
});
}
//将地图初始化函数绑定到window的load事件
google.maps.event.addDomListener(window, "load", initialize);
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="maps">
</div>
</form>
</body>
</html>