盛京彩票 ABOUT US
您现在的位置:首页 -电子地图

鏃犳爣棰樻枃妗?/title> </head> <body> <!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" /> <meta name="keywords" content="鐧惧害鍦板浘,鐧惧害鍦板浘API锛岀櫨搴﹀湴鍥捐嚜瀹氫箟宸ュ叿锛岀櫨搴﹀湴鍥炬墍瑙佸嵆鎵寰楀伐鍏? /> <meta name="description" content="鐧惧害鍦板浘API鑷畾涔夊湴鍥撅紝甯姪鐢ㄦ埛鍦ㄥ彲瑙嗗寲鎿嶄綔涓嬬敓鎴愮櫨搴﹀湴鍥? /> <title>鐧惧害鍦板浘API鑷畾涔夊湴鍥?/title> <!--寮曠敤鐧惧害鍦板浘API--> <style type="text/css"> html,body{margin:0;padding:0;} .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> </head> <body> <!--鐧惧害鍦板浘瀹瑰櫒--> <div style="width:650px;height:520px;border:#ccc solid 1px;" id="dituContent"></div> </body> <script type="text/javascript"> //鍒涘缓鍜屽垵濮嬪寲鍦板浘鍑芥暟锛? function initMap(){ createMap();//鍒涘缓鍦板浘 setMapEvent();//璁剧疆鍦板浘浜嬩欢 addMapControl();//鍚戝湴鍥炬坊鍔犳帶浠? addMarker();//鍚戝湴鍥句腑娣诲姞marker } //鍒涘缓鍦板浘鍑芥暟锛? function createMap(){ var map = new BMap.Map("dituContent");//鍦ㄧ櫨搴﹀湴鍥惧鍣ㄤ腑鍒涘缓涓涓湴鍥? var point = new BMap.Point(120.501332,31.758854);//瀹氫箟涓涓腑蹇冪偣鍧愭爣 map.centerAndZoom(point,18);//璁惧畾鍦板浘鐨勪腑蹇冪偣鍜屽潗鏍囧苟灏嗗湴鍥炬樉绀哄湪鍦板浘瀹瑰櫒涓? window.map = map;//灏唌ap鍙橀噺瀛樺偍鍦ㄥ叏灞 } //鍦板浘浜嬩欢璁剧疆鍑芥暟锛? function setMapEvent(){ map.enableDragging();//鍚敤鍦板浘鎷栨嫿浜嬩欢锛岄粯璁ゅ惎鐢?鍙笉鍐? map.enableScrollWheelZoom();//鍚敤鍦板浘婊氳疆鏀惧ぇ缂╁皬 map.enableDoubleClickZoom();//鍚敤榧犳爣鍙屽嚮鏀惧ぇ锛岄粯璁ゅ惎鐢?鍙笉鍐? map.enableKeyboard();//鍚敤閿洏涓婁笅宸﹀彸閿Щ鍔ㄥ湴鍥? } //鍦板浘鎺т欢娣诲姞鍑芥暟锛? function addMapControl(){ //鍚戝湴鍥句腑娣诲姞缂╂斁鎺т欢 var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE}); map.addControl(ctrl_nav); //鍚戝湴鍥句腑娣诲姞缂╃暐鍥炬帶浠? var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1}); map.addControl(ctrl_ove); //鍚戝湴鍥句腑娣诲姞姣斾緥灏烘帶浠? var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT}); map.addControl(ctrl_sca); } //鏍囨敞鐐规暟缁? var markerArr = [{title:"姹熼槾甯傚拰闅嗘柊鏉愭枡绉戞妧鏈夐檺鍏徃",content:"姹熼槾甯傚拰闅嗘柊鏉愭枡绉戞妧鏈夐檺鍏徃",point:"120.502181|31.757941",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}} ]; //鍒涘缓marker function addMarker(){ for(var i=0;i<markerArr.length;i++){ var json = markerArr[i]; var p0 = json.point.split("|")[0]; var p1 = json.point.split("|")[1]; var point = new BMap.Point(p0,p1); var iconImg = createIcon(json.icon); var marker = new BMap.Marker(point,{icon:iconImg}); var iw = createInfoWindow(i); var label = new BMap.Label(json.title,{"offset":new BMap.Size(json.icon.lb-json.icon.x+10,-20)}); marker.setLabel(label); map.addOverlay(marker); label.setStyle({ borderColor:"#808080", color:"#333", cursor:"pointer" }); (function(){ var index = i; var _iw = createInfoWindow(i); var _marker = marker; _marker.addEventListener("click",function(){ this.openInfoWindow(_iw); }); _iw.addEventListener("open",function(){ _marker.getLabel().hide(); }) _iw.addEventListener("close",function(){ _marker.getLabel().show(); }) label.addEventListener("click",function(){ _marker.openInfoWindow(_iw); }) if(!!json.isOpen){ label.hide(); _marker.openInfoWindow(_iw); } })() } } //鍒涘缓InfoWindow function createInfoWindow(i){ var json = markerArr[i]; var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>"+json.content+"</div>"); return iw; } //鍒涘缓涓涓狪con function createIcon(json){ var icon = new BMap.Icon("http:/map/images/us_mk_icon.png", new BMap.Size(json.w,json.h),{imageOffset: new BMap.Size(-json.l,-json.t),infoWindowOffset:new BMap.Size(json.lb+5,1),offset:new BMap.Size(json.x,json.h)}) return icon; } initMap();//鍒涘缓鍜屽垵濮嬪寲鍦板浘 </script> </html> </body> </html> </p> </div> </div> </div> <div class="cl"></div> <div class="footer" style="text-align:center;line-height:27px;background:#f3f3f3;margin-top:30px;"> <div class="width980"> <table width="100%" border="0"> <tr> <td>Copyright@ 江阴和隆新材料科技有限公司 版权所有 <br /> 电话:+86-0510-68828387 传真:+ 86-0510-68828389 地址:江阴市长泾镇长东村新农村1号</td> <td><img src="/images/helong.png" width="58" height="58" /></td> </tr> </table> </div> </div> <script language=javascript src="/yun_system/tj/stat.js"></script> </body> </html>