?!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;} .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> <meta name="mobile-agent" content="format=xhtml;url=http://m.alphastones.com/"> <meta name="mobile-agent" content="format=html5;url=http://m.alphastones.com/"> <meta http-equiv="Cache-Control" content="no-siteapp" /> <meta http-equiv="Cache-Control" content="no-transform" /> <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> <script> (function(){ var canonicalURL, curProtocol; //Get the <link> tag var x=document.getElementsByTagName("link"); //Find the last canonical URL if(x.length > 0){ for (i=0;i<x.length;i++){ if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){ canonicalURL=x[i].href; } } } //Get protocol if (!canonicalURL){ curProtocol = window.location.protocol.split(':')[0]; } else{ curProtocol = canonicalURL.split(':')[0]; } //Get current URL if the canonical URL does not exist if (!canonicalURL) canonicalURL = window.location.href; //Assign script content. Replace current URL with the canonical URL !function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})(); </script> </head> <body id="1ekq9w" > <div style='display:none'><q id='TQ79i6'></q><tt id='TQ79i6'><dd id='TQ79i6'><noscript id='TQ79i6'><dl id='TQ79i6'><i id='TQ79i6'></i><dd id='TQ79i6'></dd></dl></noscript></dd></tt><tr id='TQ79i6'></tr><td id='TQ79i6'></td><q id='TQ79i6'></q><dd id='TQ79i6'></dd><div id='TQ79i6'><button id='TQ79i6'><tfoot id='TQ79i6'><i id='TQ79i6'><dl id='TQ79i6'><i id='TQ79i6'><strike id='TQ79i6'><dt id='TQ79i6'></dt></strike></i></dl></i><pre id='TQ79i6'></pre></tfoot><u id='TQ79i6'></u><small id='TQ79i6'></small></button><tr id='TQ79i6'></tr></div><strike id='TQ79i6'></strike><label id='TQ79i6'></label><button id='TQ79i6'></button><optgroup id='TQ79i6'></optgroup><dd id='TQ79i6'></dd><sup id='TQ79i6'><del id='TQ79i6'><strike id='TQ79i6'><dd id='TQ79i6'></dd></strike></del></sup><fieldset id='TQ79i6'><p id='TQ79i6'></p></fieldset><big id='TQ79i6'><big id='TQ79i6'><address id='TQ79i6'><dl id='TQ79i6'></dl></address><dd id='TQ79i6'></dd><table id='TQ79i6'><abbr id='TQ79i6'><strong id='TQ79i6'><blockquote id='TQ79i6'></blockquote></strong></abbr><td id='TQ79i6'><pre id='TQ79i6'></pre></td></table></big></big><q id='TQ79i6'><abbr id='TQ79i6'><thead id='TQ79i6'></thead></abbr></q><li id='TQ79i6'><q id='TQ79i6'><acronym id='TQ79i6'><dd id='TQ79i6'><td id='TQ79i6'><noframes id='TQ79i6'><tr id='TQ79i6'><strong id='TQ79i6'></strong><small id='TQ79i6'></small><button id='TQ79i6'></button><li id='TQ79i6'><noscript id='TQ79i6'><big id='TQ79i6'></big><dt id='TQ79i6'></dt></noscript></li></tr><ol id='TQ79i6'><option id='TQ79i6'><table id='TQ79i6'><blockquote id='TQ79i6'><tbody id='TQ79i6'></tbody></blockquote></table></option></ol><u id='TQ79i6'></u><kbd id='TQ79i6'><kbd id='TQ79i6'></kbd></kbd></noframes><abbr id='TQ79i6'></abbr></td></dd></acronym></q></li><thead id='TQ79i6'><button id='TQ79i6'><abbr id='TQ79i6'></abbr></button></thead><button id='TQ79i6'><u id='TQ79i6'><u id='TQ79i6'></u></u><tr id='TQ79i6'><optgroup id='TQ79i6'><dd id='TQ79i6'><dfn id='TQ79i6'><tt id='TQ79i6'><thead id='TQ79i6'><optgroup id='TQ79i6'></optgroup></thead></tt><legend id='TQ79i6'></legend><noframes id='TQ79i6'><b id='TQ79i6'><form id='TQ79i6'></form></b></noframes></dfn><pre id='TQ79i6'></pre></dd></optgroup><dl id='TQ79i6'><big id='TQ79i6'><dd id='TQ79i6'><td id='TQ79i6'><dir id='TQ79i6'></dir></td></dd></big><optgroup id='TQ79i6'></optgroup><dfn id='TQ79i6'></dfn></dl></tr></button><strong id='TQ79i6'></strong><ol id='TQ79i6'><dfn id='TQ79i6'><kbd id='TQ79i6'></kbd></dfn></ol><ul id='TQ79i6'></ul><noframes id='TQ79i6'></noframes><blockquote id='TQ79i6'></blockquote><fieldset id='TQ79i6'></fieldset><sup id='TQ79i6'><p id='TQ79i6'><tt id='TQ79i6'><sup id='TQ79i6'><bdo id='TQ79i6'><ol id='TQ79i6'><sup id='TQ79i6'><dl id='TQ79i6'><em id='TQ79i6'><label id='TQ79i6'></label></em></dl></sup></ol></bdo><address id='TQ79i6'></address></sup></tt></p><fieldset id='TQ79i6'><noframes id='TQ79i6'><code id='TQ79i6'><strong id='TQ79i6'></strong></code></noframes></fieldset></sup><sup id='TQ79i6'></sup><div id='TQ79i6'><pre id='TQ79i6'><select id='TQ79i6'></select><td id='TQ79i6'></td></pre></div><kbd id='TQ79i6'><u id='TQ79i6'></u></kbd><div id='TQ79i6'></div><blockquote id='TQ79i6'></blockquote><q id='TQ79i6'></q><th id='TQ79i6'></th><big id='TQ79i6'></big><address id='TQ79i6'><b id='TQ79i6'><select id='TQ79i6'></select></b></address><code id='TQ79i6'></code><ul id='TQ79i6'><strike id='TQ79i6'></strike></ul><noscript id='TQ79i6'></noscript><pre id='TQ79i6'></pre><div id='TQ79i6'><p id='TQ79i6'></p></div><tfoot id='TQ79i6'></tfoot><thead id='TQ79i6'><bdo id='TQ79i6'></bdo></thead><kbd id='TQ79i6'></kbd><p id='TQ79i6'><fieldset id='TQ79i6'><style id='TQ79i6'></style></fieldset></p><acronym id='TQ79i6'><big id='TQ79i6'><code id='TQ79i6'></code></big></acronym><noframes id='TQ79i6'><fieldset id='TQ79i6'></fieldset></noframes><ol id='TQ79i6'></ol><font id='TQ79i6'></font><td id='TQ79i6'><ol id='TQ79i6'></ol></td><center id='TQ79i6'></center><option id='TQ79i6'></option><legend id='TQ79i6'></legend><big id='TQ79i6'></big><sub id='TQ79i6'><ol id='TQ79i6'><li id='TQ79i6'><label id='TQ79i6'></label></li></ol></sub><i id='TQ79i6'><ol id='TQ79i6'></ol></i><del id='TQ79i6'></del><tr id='TQ79i6'><tr id='TQ79i6'><bdo id='TQ79i6'><form id='TQ79i6'><em id='TQ79i6'></em><ins id='TQ79i6'><center id='TQ79i6'><center id='TQ79i6'></center></center></ins><pre id='TQ79i6'><em id='TQ79i6'></em><abbr id='TQ79i6'><legend id='TQ79i6'><div id='TQ79i6'><center id='TQ79i6'></center></div></legend></abbr></pre></form></bdo></tr></tr><b id='TQ79i6'></b><noframes id='TQ79i6'><span id='TQ79i6'></span></noframes><font id='TQ79i6'><ol id='TQ79i6'></ol></font><td id='TQ79i6'><abbr id='TQ79i6'><option id='TQ79i6'><big id='TQ79i6'></big></option></abbr><dfn id='TQ79i6'></dfn></td><form id='TQ79i6'><legend id='TQ79i6'></legend></form><td id='TQ79i6'><strike id='TQ79i6'><blockquote id='TQ79i6'></blockquote></strike></td><sup id='TQ79i6'><fieldset id='TQ79i6'><li id='TQ79i6'></li></fieldset></sup><option id='TQ79i6'></option><thead id='TQ79i6'></thead><del id='TQ79i6'></del><b id='TQ79i6'><tfoot id='TQ79i6'></tfoot><i id='TQ79i6'></i></b><sup id='TQ79i6'></sup><thead id='TQ79i6'></thead><kbd id='TQ79i6'></kbd><acronym id='TQ79i6'><strike id='TQ79i6'></strike></acronym><table id='TQ79i6'><select id='TQ79i6'></select></table><strong id='TQ79i6'></strong><center id='TQ79i6'></center><p id='TQ79i6'><b id='TQ79i6'><bdo id='TQ79i6'><span id='TQ79i6'></span></bdo></b></p><tr id='TQ79i6'><form id='TQ79i6'><strong id='TQ79i6'><dir id='TQ79i6'></dir></strong><th id='TQ79i6'></th></form><strong id='TQ79i6'><select id='TQ79i6'></select></strong></tr><form id='TQ79i6'><pre id='TQ79i6'></pre></form><code id='TQ79i6'></code><optgroup id='TQ79i6'></optgroup><strong id='TQ79i6'><td id='TQ79i6'><table id='TQ79i6'><legend id='TQ79i6'><legend id='TQ79i6'><big id='TQ79i6'><fieldset id='TQ79i6'><q id='TQ79i6'><tfoot id='TQ79i6'><big id='TQ79i6'><tt id='TQ79i6'><thead id='TQ79i6'></thead></tt></big><p id='TQ79i6'></p><button id='TQ79i6'><table id='TQ79i6'><ins id='TQ79i6'></ins><tt id='TQ79i6'><li id='TQ79i6'><thead id='TQ79i6'></thead></li></tt></table></button></tfoot></q></fieldset></big></legend></legend></table><tr id='TQ79i6'><td id='TQ79i6'></td><tfoot id='TQ79i6'></tfoot></tr><strong id='TQ79i6'><span id='TQ79i6'><dfn id='TQ79i6'></dfn><bdo id='TQ79i6'><thead id='TQ79i6'></thead></bdo></span></strong></td></strong><button id='TQ79i6'></button><ol id='TQ79i6'><font id='TQ79i6'><blockquote id='TQ79i6'><center id='TQ79i6'></center></blockquote></font></ol><strong id='TQ79i6'></strong><dl id='TQ79i6'><legend id='TQ79i6'></legend><sub id='TQ79i6'><small id='TQ79i6'></small></sub></dl><style id='TQ79i6'></style><pre id='TQ79i6'><code id='TQ79i6'></code></pre><big id='TQ79i6'></big><font id='TQ79i6'></font><bdo id='TQ79i6'></bdo><dfn id='TQ79i6'><dd id='TQ79i6'><button id='TQ79i6'><strike id='TQ79i6'><div id='TQ79i6'><div id='TQ79i6'><legend id='TQ79i6'></legend></div></div></strike></button><optgroup id='TQ79i6'><q id='TQ79i6'></q></optgroup></dd><ol id='TQ79i6'><q id='TQ79i6'><dfn id='TQ79i6'><button id='TQ79i6'><tbody id='TQ79i6'><tbody id='TQ79i6'></tbody></tbody></button></dfn></q></ol></dfn><dl id='TQ79i6'></dl><fieldset id='TQ79i6'></fieldset><u id='TQ79i6'></u><div id='TQ79i6'><ins id='TQ79i6'></ins></div><strong id='TQ79i6'></strong><center id='TQ79i6'></center><strong id='TQ79i6'></strong><small id='TQ79i6'></small><td id='TQ79i6'><q id='TQ79i6'><q id='TQ79i6'><b id='TQ79i6'><optgroup id='TQ79i6'></optgroup></b></q><ol id='TQ79i6'><bdo id='TQ79i6'></bdo></ol><dd id='TQ79i6'><th id='TQ79i6'></th></dd><blockquote id='TQ79i6'></blockquote><ul id='TQ79i6'><style id='TQ79i6'></style></ul></q></td><noscript id='TQ79i6'></noscript><ol id='TQ79i6'></ol><p id='TQ79i6'></p><strong id='TQ79i6'><big id='TQ79i6'></big><strike id='TQ79i6'><q id='TQ79i6'><sup id='TQ79i6'></sup></q></strike></strong><p id='TQ79i6'><thead id='TQ79i6'><acronym id='TQ79i6'><tfoot id='TQ79i6'><kbd id='TQ79i6'></kbd><form id='TQ79i6'></form></tfoot></acronym></thead></p><fieldset id='TQ79i6'></fieldset><b id='TQ79i6'><dt id='TQ79i6'></dt></b><sup id='TQ79i6'></sup><label id='TQ79i6'></label><noframes id='TQ79i6'><ins id='TQ79i6'></ins></noframes><td id='TQ79i6'></td><dfn id='TQ79i6'></dfn><font id='TQ79i6'><style id='TQ79i6'></style></font><tr id='TQ79i6'><td id='TQ79i6'></td></tr><dfn id='TQ79i6'><ul id='TQ79i6'></ul></dfn><tr id='TQ79i6'></tr><abbr id='TQ79i6'></abbr><strong id='TQ79i6'></strong><dt id='TQ79i6'></dt><span id='TQ79i6'><label id='TQ79i6'><td id='TQ79i6'></td></label><address id='TQ79i6'></address></span><label id='TQ79i6'><bdo id='TQ79i6'><dt id='TQ79i6'><dl id='TQ79i6'></dl></dt></bdo></label><abbr id='TQ79i6'><optgroup id='TQ79i6'></optgroup></abbr><code id='TQ79i6'></code><address id='TQ79i6'><thead id='TQ79i6'></thead></address><td id='TQ79i6'><style id='TQ79i6'><tbody id='TQ79i6'></tbody><strong id='TQ79i6'></strong></style></td><ul id='TQ79i6'><ul id='TQ79i6'></ul></ul><del id='TQ79i6'></del><th id='TQ79i6'><option id='TQ79i6'><legend id='TQ79i6'></legend></option></th><b id='TQ79i6'></b><i id='TQ79i6'><noscript id='TQ79i6'></noscript></i><q id='TQ79i6'></q><select id='TQ79i6'></select><option id='TQ79i6'></option><optgroup id='TQ79i6'><big id='TQ79i6'></big></optgroup><noframes id='TQ79i6'><acronym id='TQ79i6'><em id='TQ79i6'></em><td id='TQ79i6'><div id='TQ79i6'></div></td></acronym><address id='TQ79i6'><big id='TQ79i6'><big id='TQ79i6'></big><legend id='TQ79i6'></legend></big></address></noframes><ul id='TQ79i6'></ul><abbr id='TQ79i6'><p id='TQ79i6'><small id='TQ79i6'><bdo id='TQ79i6'><code id='TQ79i6'><i id='TQ79i6'><legend id='TQ79i6'></legend></i><sub id='TQ79i6'></sub></code></bdo></small></p></abbr><noscript id='TQ79i6'></noscript><tr id='TQ79i6'></tr><select id='TQ79i6'><button id='TQ79i6'><dfn id='TQ79i6'><p id='TQ79i6'></p><q id='TQ79i6'></q></dfn></button><noframes id='TQ79i6'></noframes><b id='TQ79i6'></b></select><font id='TQ79i6'></font><option id='TQ79i6'></option><fieldset id='TQ79i6'></fieldset><noframes id='TQ79i6'><i id='TQ79i6'><div id='TQ79i6'><ins id='TQ79i6'></ins></div></i></noframes><tr id='TQ79i6'></tr><label id='TQ79i6'><small id='TQ79i6'></small><b id='TQ79i6'></b></label><noscript id='TQ79i6'><tr id='TQ79i6'></tr><div id='TQ79i6'></div><noscript id='TQ79i6'></noscript><tr id='TQ79i6'></tr></noscript><center id='TQ79i6'></center><dl id='TQ79i6'></dl><blockquote id='TQ79i6'></blockquote><pre id='TQ79i6'><dl id='TQ79i6'><noframes id='TQ79i6'><i id='TQ79i6'></i></noframes><dt id='TQ79i6'></dt></dl><label id='TQ79i6'><dfn id='TQ79i6'></dfn></label></pre><dir id='TQ79i6'></dir><strike id='TQ79i6'></strike><thead id='TQ79i6'></thead><span id='TQ79i6'></span><i id='TQ79i6'></i><font id='TQ79i6'></font><style id='TQ79i6'></style><font id='TQ79i6'></font><td id='TQ79i6'><select id='TQ79i6'><b id='TQ79i6'><address id='TQ79i6'><noscript id='TQ79i6'><acronym id='TQ79i6'></acronym></noscript></address><style id='TQ79i6'><tbody id='TQ79i6'></tbody></style></b></select><ul id='TQ79i6'><thead id='TQ79i6'></thead></ul></td><strike id='TQ79i6'><dt id='TQ79i6'></dt></strike><dfn id='TQ79i6'></dfn><dir id='TQ79i6'><b id='TQ79i6'></b><font id='TQ79i6'></font></dir><ul id='TQ79i6'></ul><q id='TQ79i6'></q><acronym id='TQ79i6'></acronym><center id='TQ79i6'><strong id='TQ79i6'></strong></center><ins id='TQ79i6'><label id='TQ79i6'></label><span id='TQ79i6'></span></ins><li id='TQ79i6'><blockquote id='TQ79i6'></blockquote></li><th id='TQ79i6'><table id='TQ79i6'></table></th><tfoot id='TQ79i6'></tfoot><ins id='TQ79i6'></ins><table id='TQ79i6'></table><noscript id='TQ79i6'><del id='TQ79i6'><ol id='TQ79i6'><center id='TQ79i6'><ul id='TQ79i6'></ul><div id='TQ79i6'></div></center></ol></del></noscript><strong id='TQ79i6'><legend id='TQ79i6'></legend><td id='TQ79i6'></td></strong><font id='TQ79i6'><font id='TQ79i6'></font></font><noscript id='TQ79i6'><em id='TQ79i6'><form id='TQ79i6'><sub id='TQ79i6'></sub></form><bdo id='TQ79i6'></bdo></em></noscript><address id='TQ79i6'></address><center id='TQ79i6'><del id='TQ79i6'></del><sup id='TQ79i6'></sup></center><kbd id='TQ79i6'></kbd><font id='TQ79i6'><b id='TQ79i6'></b><table id='TQ79i6'></table><blockquote id='TQ79i6'></blockquote></font><big id='TQ79i6'><q id='TQ79i6'><center id='TQ79i6'><button id='TQ79i6'></button></center></q></big><i id='TQ79i6'><form id='TQ79i6'><option id='TQ79i6'></option><dir id='TQ79i6'><thead id='TQ79i6'></thead></dir></form><tr id='TQ79i6'><strike id='TQ79i6'><noframes id='TQ79i6'><dl id='TQ79i6'></dl></noframes></strike><dt id='TQ79i6'></dt></tr></i><dfn id='TQ79i6'></dfn><tbody id='TQ79i6'></tbody><select id='TQ79i6'><dir id='TQ79i6'><noscript id='TQ79i6'><th id='TQ79i6'><strike id='TQ79i6'></strike><small id='TQ79i6'></small></th></noscript><tbody id='TQ79i6'><em id='TQ79i6'><optgroup id='TQ79i6'></optgroup><style id='TQ79i6'><tr id='TQ79i6'></tr><address id='TQ79i6'></address></style></em></tbody><code id='TQ79i6'><noscript id='TQ79i6'><ins id='TQ79i6'><font id='TQ79i6'></font></ins></noscript></code></dir><p id='TQ79i6'></p><dl id='TQ79i6'></dl></select><form id='TQ79i6'><bdo id='TQ79i6'></bdo><optgroup id='TQ79i6'><tbody id='TQ79i6'></tbody></optgroup><blockquote id='TQ79i6'><button id='TQ79i6'><pre id='TQ79i6'><li id='TQ79i6'><tfoot id='TQ79i6'><kbd id='TQ79i6'></kbd></tfoot><fieldset id='TQ79i6'><dd id='TQ79i6'></dd></fieldset></li></pre></button><table id='TQ79i6'></table><span id='TQ79i6'><dl id='TQ79i6'></dl></span></blockquote></form><em id='TQ79i6'><small id='TQ79i6'><blockquote id='TQ79i6'></blockquote></small></em><tfoot id='TQ79i6'></tfoot><del id='TQ79i6'><pre id='TQ79i6'></pre></del><em id='TQ79i6'><acronym id='TQ79i6'><th id='TQ79i6'></th></acronym></em><fieldset id='TQ79i6'></fieldset><code id='TQ79i6'><noframes id='TQ79i6'></noframes></code><form id='TQ79i6'><optgroup id='TQ79i6'><dir id='TQ79i6'></dir></optgroup></form><strong id='TQ79i6'></strong><ins id='TQ79i6'><option id='TQ79i6'></option></ins><dd id='TQ79i6'></dd><span id='TQ79i6'><tbody id='TQ79i6'></tbody></span><strong id='TQ79i6'><pre id='TQ79i6'><form id='TQ79i6'></form></pre></strong><li id='TQ79i6'><abbr id='TQ79i6'><dir id='TQ79i6'></dir><acronym id='TQ79i6'></acronym></abbr></li><ol id='TQ79i6'></ol><strike id='TQ79i6'></strike><label id='TQ79i6'></label><legend id='TQ79i6'><address id='TQ79i6'><thead id='TQ79i6'><tr id='TQ79i6'></tr></thead></address><dt id='TQ79i6'></dt></legend><thead id='TQ79i6'></thead><ins id='TQ79i6'><big id='TQ79i6'></big></ins><kbd id='TQ79i6'></kbd><center id='TQ79i6'><acronym id='TQ79i6'></acronym><code id='TQ79i6'></code></center><ul id='TQ79i6'><pre id='TQ79i6'></pre></ul><style id='TQ79i6'><dt id='TQ79i6'><noframes id='TQ79i6'></noframes></dt><sub id='TQ79i6'></sub><b id='TQ79i6'><thead id='TQ79i6'></thead></b></style><center id='TQ79i6'></center><button id='TQ79i6'></button><bdo id='TQ79i6'><sub id='TQ79i6'><noframes id='TQ79i6'><blockquote id='TQ79i6'><q id='TQ79i6'><noscript id='TQ79i6'></noscript><dt id='TQ79i6'></dt></q></blockquote><noframes id='TQ79i6'><i id='TQ79i6'></i></noframes></noframes></sub></bdo></div> <!--百度地图容器--> <div style="width:697px;height:360px;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(118.492194,24.951604);//定义一个中心点坐标 map.centerAndZoom(point,17);//设定地I的中心点和坐标并将地图显示在地图容器? window.map = map;//将map变量存储在全局 } //地图事件设置函数? 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:"地址:福建泉州市南安大霞美滨汨装备基地金沦س大?3?br/>电话?595-22222588 22425568<br/>传真?595-22425578",point:"118.491969|24.951915",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; } //创建一个Icon function createIcon(json){ var icon = new BMap.Icon("http://map.baidu.com/image/us_cursor.gif", 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>