81,076
社区成员




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example</title>
<script src="http://maps.google.com/maps?
file=api&v=2&key=ABQIAAAAmSyaZYJEj-
zmAamQg_Fp6BQUdL8CL9NK1APCG9xk56Ma5zl32BTSNGgpdQgj1PRIyxFaQXrkGAHHAA"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(34.265,108.46), 5);
map.setCenter(new GLatLng(30.265,100.46), 4); //第二个标记,不生效,是这样写吗
?
}
var point = new GLatLng(30.22,120.20);
var marker = new GMarker(point);
GEvent.addListener(marker, "mouseover", function(){marker.openInfoWindowHtml
("HangZhou!");});
GEvent.addListener(marker, "mouseover", function(){marker.openInfoWindowHtml
("ShenZhen!");}); //第二个标记的标注,请问是这样写吗?谢谢!
map.addOverlay(marker);
}
</script>
</head>
<body onload="load()">
<div id="map" style="width: 1000px; height: 800px"></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(34.265,108.46), 5);
}
var point = new GLatLng(30.22,120.20);
var marker = new GMarker(point);
GEvent.addListener(marker, "mouseover", function(){marker.openInfoWindowHtml("HangZhou!");});
map.addOverlay(marker);
}
</script>
</head>
<body onload="load()">
<div id="map" style="width: 1000px; height: 800px"></div>
</body>
</html>