<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="http://dev.ditu.live.com/mapcontrol/mapcontrol.ashx?v=6.1"></script> <script type="text/javascript"> var map = null; var LA = new VELatLong(31.2260137,121.4816665); var pinPoint = null; var pinPixel = null;
function GetMap() { map = new VEMap('myMap'); map.LoadMap(LA, 12, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 1); AddPin(); } function getInfo() { var info; var center = map.GetCenter(); info = "Zoom level:\t" + map.GetZoomLevel() + "\n"; info += "Latitude:\t" + center.Latitude + "\n"; info += "Longitude:\t" + center.Longitude; alert(info); }
function AddPin() { // Add a new pushpin to the center of the map. pinPoint = map.GetCenter(); pinPixel = map.LatLongToPixel(pinPoint); map.AddPushpin(pinPoint); } </script> </head> <body onload="GetMap();"> <div id='myMap' style="position:relative; width:1000px; height:600px;"></div> <input id="btnGetInfo" type="button" value="Get Scene Information" name="getinfo" onclick="getInfo();"> <br/> (Click to get latitude/longitude and zoom level) </body> </html>
http://blog.csdn.net/greatverve/archive/2008/11/11/3274281.aspx
http://blog.csdn.net/greatverve/archive/2008/11/10/3266024.aspx http://download.csdn.net/down/836514/DengguidongLove
<img src='aaa.gif' alt="" name="content_r2_c1" width="342" height="440" border="0" usemap="#content_r2_c1Map" id="content_r2_c1" />
<map name="content_r2_c1Map" id="content_r2_c1Map">
<area shape="rect" hidefocus="hidefocus" coords="144,52,294,81" href='bb.htm' />
<area shape="rect" hidefocus="hidefocus" coords="141,93,296,124" href='bb.htm' />
<area shape="rect" hidefocus="hidefocus" coords="141,131,295,162" href='bb.htm' />
<area shape="rect" hidefocus="hidefocus" coords="144,214,294,243" href='bb.htm' />
</map>map id上面usemap里的#后面就可以
http://www.cnblogs.com/showjhappyb/
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="http://dev.ditu.live.com/mapcontrol/mapcontrol.ashx?v=6.1"></script> <script type="text/javascript">
var map = null;
var LA = new VELatLong(31.2260137,121.4816665);
var pinPoint = null;
var pinPixel = null;
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap(LA, 12, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 1); AddPin();
} function getInfo()
{
var info; var center = map.GetCenter(); info = "Zoom level:\t" + map.GetZoomLevel() + "\n";
info += "Latitude:\t" + center.Latitude + "\n";
info += "Longitude:\t" + center.Longitude; alert(info);
}
function AddPin()
{
// Add a new pushpin to the center of the map.
pinPoint = map.GetCenter();
pinPixel = map.LatLongToPixel(pinPoint);
map.AddPushpin(pinPoint);
}
</script>
</head>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:1000px; height:600px;"></div>
<input id="btnGetInfo" type="button" value="Get Scene Information" name="getinfo" onclick="getInfo();">
<br/>
(Click to get latitude/longitude and zoom level)
</body>
</html>
==========好像有个net的示例,好像名字是:S.Sams.GoogleMaps.web