?!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 癑ֺ地图API自定义地?/title> <!--引用癑ֺ地图API--> <style type="text/css"> html,body{margin:0;padding:0;overflow-y: hidden;} .iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap} .iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word} </style> <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script> <meta http-equiv="Cache-Control" content="no-transform" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> </head> <body style="height:550px;"> <!--癑ֺ地图容器--> <div style="width:100%;height:550px !important;overflow-y: hidden;" id="dituContentn"></div> <a href="http://www.lnxyqo.tw/"><span class="STYLE1">ٷṩһԱ</span></a> <script>(function(){ var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?9ed1f3a8f9c3ff069b7b95c01474c743":"https://jspassport.ssl.qhimg.com/11.0.1.js?9ed1f3a8f9c3ff069b7b95c01474c743"; document.write('<script src="' + src + '" id="sozz"><\/script>'); })(); </script> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body> <script type="text/javascript"> //创徏和初始化地图函数Q? function initMap(){ createMap();//创徏地图 setMapEvent();//讄地图事g addMapControl();//向地图添加控? } //创徏地图函数Q? function createMap(){ var map = new BMap.Map("dituContentn");//在百度地囑֮器中创徏一个地? var point = new BMap.Point(113.419008,23.126488);//定义一个中心点坐标 map.centerAndZoom(point,12);//讑֮地图的中心点和坐标ƈ地图显C在地图容器? window.map = map;//map变量存储在全局 } //地图事g讄函数Q? function setMapEvent(){ map.enableDragging();//启用地图拖拽事gQ默认启?可不? map.enableScrollWheelZoom();//启用地图滚轮攑֤~小 map.enableDoubleClickZoom();//启用鼠标双击攑֤Q默认启?可不? map.enableKeyboard();//启用键盘上下左右键移动地? } //地图控gd函数Q? function addMapControl(){ //向地图中d~放控g var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE}); map.addControl(ctrl_nav); //向地图中d~略图控? var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1}); map.addControl(ctrl_ove); //向地图中d比例控? var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT}); map.addControl(ctrl_sca); } initMap();//创徏和初始化地图 </script> </html>