怎么在Google地图中添加多个标记?
怎么在Google地图中添加多个标记?并且可以自己设置标识样式?<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN""ht...
怎么在Google地图中添加多个标记?并且可以自己设置标识样式?
<!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>Control Initialization</title>
<script src="http://maps.google.com/maps?file=api&;v=2&key=ABQIAAAAaXbp3az7K8MqVhA84QSbSRQTXSfCh5YNzoYmNE7sv1hCVPt9ThTBAsesQkCA1r3p6FabujHlxUEMDQ" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"),
{ size: new GSize(640,320) } );
map.setCenter(new GLatLng(30.665629182040032,104.06497836112976), 11);
var customUI = map.getDefaultUI();
// Remove MapType.G_HYBRID_MAP
customUI.maptypes.hybrid = false;
map.setUI(customUI);
var geoPoint0= new GLatLng(30.66,104.06);
var marker0 = new GMarker(geoPoint0);
map.addOverlay(marker0);
}
}
//]]>
</script>
</head>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" style="width: 640px; height: 320px"></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>Control Initialization</title>
<script src="http://maps.google.com/maps?file=api&;v=2&key=ABQIAAAAaXbp3az7K8MqVhA84QSbSRQTXSfCh5YNzoYmNE7sv1hCVPt9ThTBAsesQkCA1r3p6FabujHlxUEMDQ" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"),
{ size: new GSize(640,320) } );
map.setCenter(new GLatLng(30.665629182040032,104.06497836112976), 11);
var customUI = map.getDefaultUI();
// Remove MapType.G_HYBRID_MAP
customUI.maptypes.hybrid = false;
map.setUI(customUI);
var geoPoint0= new GLatLng(30.66,104.06);
var marker0 = new GMarker(geoPoint0);
map.addOverlay(marker0);
}
}
//]]>
</script>
</head>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" style="width: 640px; height: 320px"></div>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询