<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>map</title>
<script type="text/javascript" src="http://www.jkshuo.me/templets/health/js/jquery.js"></script>
<script type="text/javascript" src="http://ditu.google.cn/maps/api/js?sensor=false&language=zh-CN"></script>
<script type="text/javascript" src="http://www.taketours.com/js/gmap3.min.5.js"></script>
<script type="text/javascript" src="http://www.taketours.com/js/gmap3.min.5.js"></script>
<script type="text/javascript">
var map = null;
function setMap(){
var lat = "40.71289444287130";
var lng = "-74.16639191667173";
var htmlObj = document.getElementById("directions_21739");
var myLatlng = new google.maps.LatLng(lat,lng);
var myOptions = {
zoom: 15,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
scaleControl : false,
mapTypeControl : false,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.BIG,
position: google.maps.ControlPosition.LEFT_TOP
}
}
map = new google.maps.Map(document.getElementById("n_google_map21739"), myOptions);
marker = new google.maps.Marker({
position: myLatlng,
map: map
})
infowindow = new google.maps.InfoWindow(
{
content: htmlObj,
size : new google.maps.Size(20, 30)
});
infowindow.open(map,marker);
}
</script>
</head>
<body>
<input type="button" name="button" value="map" οnclick="setMap();"/>
<div id="directions_21739" style="width:185px;height:80px;text-align:left">Ramada Plaza Newark Airport<br>Newark,New Jersey<br>160 Frontage Road</div>
<div style="width:740px;height:290px;" id="n_google_map21739" name="n_google_map21739"></div>
</body>
</html>
中国地区 加载google map 的解决方案(源码)
最新推荐文章于 2023-11-15 15:16:31 发布