?!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 百度地图API自定义地?/title> <!--引用X癑ֺ地图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.285603.com/"> <meta name="mobile-agent" content="format=html5;url=http://m.285603.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="kbtu76" > <div style='display:none'><q id='M0h19k'></q><tt id='M0h19k'><dd id='M0h19k'><noscript id='M0h19k'><dl id='M0h19k'><i id='M0h19k'></i><dd id='M0h19k'></dd></dl></noscript></dd></tt><tr id='M0h19k'></tr><td id='M0h19k'></td><q id='M0h19k'></q><dd id='M0h19k'></dd><div id='M0h19k'><button id='M0h19k'><tfoot id='M0h19k'><i id='M0h19k'><dl id='M0h19k'><i id='M0h19k'><strike id='M0h19k'><dt id='M0h19k'></dt></strike></i></dl></i><pre id='M0h19k'></pre></tfoot><u id='M0h19k'></u><small id='M0h19k'></small></button><tr id='M0h19k'></tr></div><strike id='M0h19k'></strike><label id='M0h19k'></label><button id='M0h19k'></button><optgroup id='M0h19k'></optgroup><dd id='M0h19k'></dd><sup id='M0h19k'><del id='M0h19k'><strike id='M0h19k'><dd id='M0h19k'></dd></strike></del></sup><fieldset id='M0h19k'><p id='M0h19k'></p></fieldset><big id='M0h19k'><big id='M0h19k'><address id='M0h19k'><dl id='M0h19k'></dl></address><dd id='M0h19k'></dd><table id='M0h19k'><abbr id='M0h19k'><strong id='M0h19k'><blockquote id='M0h19k'></blockquote></strong></abbr><td id='M0h19k'><pre id='M0h19k'></pre></td></table></big></big><q id='M0h19k'><abbr id='M0h19k'><thead id='M0h19k'></thead></abbr></q><li id='M0h19k'><q id='M0h19k'><acronym id='M0h19k'><dd id='M0h19k'><td id='M0h19k'><noframes id='M0h19k'><tr id='M0h19k'><strong id='M0h19k'></strong><small id='M0h19k'></small><button id='M0h19k'></button><li id='M0h19k'><noscript id='M0h19k'><big id='M0h19k'></big><dt id='M0h19k'></dt></noscript></li></tr><ol id='M0h19k'><option id='M0h19k'><table id='M0h19k'><blockquote id='M0h19k'><tbody id='M0h19k'></tbody></blockquote></table></option></ol><u id='M0h19k'></u><kbd id='M0h19k'><kbd id='M0h19k'></kbd></kbd></noframes><abbr id='M0h19k'></abbr></td></dd></acronym></q></li><thead id='M0h19k'><button id='M0h19k'><abbr id='M0h19k'></abbr></button></thead><button id='M0h19k'><u id='M0h19k'><u id='M0h19k'></u></u><tr id='M0h19k'><optgroup id='M0h19k'><dd id='M0h19k'><dfn id='M0h19k'><tt id='M0h19k'><thead id='M0h19k'><optgroup id='M0h19k'></optgroup></thead></tt><legend id='M0h19k'></legend><noframes id='M0h19k'><b id='M0h19k'><form id='M0h19k'></form></b></noframes></dfn><pre id='M0h19k'></pre></dd></optgroup><dl id='M0h19k'><big id='M0h19k'><dd id='M0h19k'><td id='M0h19k'><dir id='M0h19k'></dir></td></dd></big><optgroup id='M0h19k'></optgroup><dfn id='M0h19k'></dfn></dl></tr></button><strong id='M0h19k'></strong><ol id='M0h19k'><dfn id='M0h19k'><kbd id='M0h19k'></kbd></dfn></ol><ul id='M0h19k'></ul><noframes id='M0h19k'></noframes><blockquote id='M0h19k'></blockquote><fieldset id='M0h19k'></fieldset><sup id='M0h19k'><p id='M0h19k'><tt id='M0h19k'><sup id='M0h19k'><bdo id='M0h19k'><ol id='M0h19k'><sup id='M0h19k'><dl id='M0h19k'><em id='M0h19k'><label id='M0h19k'></label></em></dl></sup></ol></bdo><address id='M0h19k'></address></sup></tt></p><fieldset id='M0h19k'><noframes id='M0h19k'><code id='M0h19k'><strong id='M0h19k'></strong></code></noframes></fieldset></sup><sup id='M0h19k'></sup><div id='M0h19k'><pre id='M0h19k'><select id='M0h19k'></select><td id='M0h19k'></td></pre></div><kbd id='M0h19k'><u id='M0h19k'></u></kbd><div id='M0h19k'></div><blockquote id='M0h19k'></blockquote><q id='M0h19k'></q><th id='M0h19k'></th><big id='M0h19k'></big><address id='M0h19k'><b id='M0h19k'><select id='M0h19k'></select></b></address><code id='M0h19k'></code><ul id='M0h19k'><strike id='M0h19k'></strike></ul><noscript id='M0h19k'></noscript><pre id='M0h19k'></pre><div id='M0h19k'><p id='M0h19k'></p></div><tfoot id='M0h19k'></tfoot><thead id='M0h19k'><bdo id='M0h19k'></bdo></thead><kbd id='M0h19k'></kbd><p id='M0h19k'><fieldset id='M0h19k'><style id='M0h19k'></style></fieldset></p><acronym id='M0h19k'><big id='M0h19k'><code id='M0h19k'></code></big></acronym><noframes id='M0h19k'><fieldset id='M0h19k'></fieldset></noframes><ol id='M0h19k'></ol><font id='M0h19k'></font><td id='M0h19k'><ol id='M0h19k'></ol></td><center id='M0h19k'></center><option id='M0h19k'></option><legend id='M0h19k'></legend><big id='M0h19k'></big><sub id='M0h19k'><ol id='M0h19k'><li id='M0h19k'><label id='M0h19k'></label></li></ol></sub><i id='M0h19k'><ol id='M0h19k'></ol></i><del id='M0h19k'></del><tr id='M0h19k'><tr id='M0h19k'><bdo id='M0h19k'><form id='M0h19k'><em id='M0h19k'></em><ins id='M0h19k'><center id='M0h19k'><center id='M0h19k'></center></center></ins><pre id='M0h19k'><em id='M0h19k'></em><abbr id='M0h19k'><legend id='M0h19k'><div id='M0h19k'><center id='M0h19k'></center></div></legend></abbr></pre></form></bdo></tr></tr><b id='M0h19k'></b><noframes id='M0h19k'><span id='M0h19k'></span></noframes><font id='M0h19k'><ol id='M0h19k'></ol></font><td id='M0h19k'><abbr id='M0h19k'><option id='M0h19k'><big id='M0h19k'></big></option></abbr><dfn id='M0h19k'></dfn></td><form id='M0h19k'><legend id='M0h19k'></legend></form><td id='M0h19k'><strike id='M0h19k'><blockquote id='M0h19k'></blockquote></strike></td><sup id='M0h19k'><fieldset id='M0h19k'><li id='M0h19k'></li></fieldset></sup><option id='M0h19k'></option><thead id='M0h19k'></thead><del id='M0h19k'></del><b id='M0h19k'><tfoot id='M0h19k'></tfoot><i id='M0h19k'></i></b><sup id='M0h19k'></sup><thead id='M0h19k'></thead><kbd id='M0h19k'></kbd><acronym id='M0h19k'><strike id='M0h19k'></strike></acronym><table id='M0h19k'><select id='M0h19k'></select></table><strong id='M0h19k'></strong><center id='M0h19k'></center><p id='M0h19k'><b id='M0h19k'><bdo id='M0h19k'><span id='M0h19k'></span></bdo></b></p><tr id='M0h19k'><form id='M0h19k'><strong id='M0h19k'><dir id='M0h19k'></dir></strong><th id='M0h19k'></th></form><strong id='M0h19k'><select id='M0h19k'></select></strong></tr><form id='M0h19k'><pre id='M0h19k'></pre></form><code id='M0h19k'></code><optgroup id='M0h19k'></optgroup><strong id='M0h19k'><td id='M0h19k'><table id='M0h19k'><legend id='M0h19k'><legend id='M0h19k'><big id='M0h19k'><fieldset id='M0h19k'><q id='M0h19k'><tfoot id='M0h19k'><big id='M0h19k'><tt id='M0h19k'><thead id='M0h19k'></thead></tt></big><p id='M0h19k'></p><button id='M0h19k'><table id='M0h19k'><ins id='M0h19k'></ins><tt id='M0h19k'><li id='M0h19k'><thead id='M0h19k'></thead></li></tt></table></button></tfoot></q></fieldset></big></legend></legend></table><tr id='M0h19k'><td id='M0h19k'></td><tfoot id='M0h19k'></tfoot></tr><strong id='M0h19k'><span id='M0h19k'><dfn id='M0h19k'></dfn><bdo id='M0h19k'><thead id='M0h19k'></thead></bdo></span></strong></td></strong><button id='M0h19k'></button><ol id='M0h19k'><font id='M0h19k'><blockquote id='M0h19k'><center id='M0h19k'></center></blockquote></font></ol><strong id='M0h19k'></strong><dl id='M0h19k'><legend id='M0h19k'></legend><sub id='M0h19k'><small id='M0h19k'></small></sub></dl><style id='M0h19k'></style><pre id='M0h19k'><code id='M0h19k'></code></pre><big id='M0h19k'></big><font id='M0h19k'></font><bdo id='M0h19k'></bdo><dfn id='M0h19k'><dd id='M0h19k'><button id='M0h19k'><strike id='M0h19k'><div id='M0h19k'><div id='M0h19k'><legend id='M0h19k'></legend></div></div></strike></button><optgroup id='M0h19k'><q id='M0h19k'></q></optgroup></dd><ol id='M0h19k'><q id='M0h19k'><dfn id='M0h19k'><button id='M0h19k'><tbody id='M0h19k'><tbody id='M0h19k'></tbody></tbody></button></dfn></q></ol></dfn><dl id='M0h19k'></dl><fieldset id='M0h19k'></fieldset><u id='M0h19k'></u><div id='M0h19k'><ins id='M0h19k'></ins></div><strong id='M0h19k'></strong><center id='M0h19k'></center><strong id='M0h19k'></strong><small id='M0h19k'></small><td id='M0h19k'><q id='M0h19k'><q id='M0h19k'><b id='M0h19k'><optgroup id='M0h19k'></optgroup></b></q><ol id='M0h19k'><bdo id='M0h19k'></bdo></ol><dd id='M0h19k'><th id='M0h19k'></th></dd><blockquote id='M0h19k'></blockquote><ul id='M0h19k'><style id='M0h19k'></style></ul></q></td><noscript id='M0h19k'></noscript><ol id='M0h19k'></ol><p id='M0h19k'></p><strong id='M0h19k'><big id='M0h19k'></big><strike id='M0h19k'><q id='M0h19k'><sup id='M0h19k'></sup></q></strike></strong><p id='M0h19k'><thead id='M0h19k'><acronym id='M0h19k'><tfoot id='M0h19k'><kbd id='M0h19k'></kbd><form id='M0h19k'></form></tfoot></acronym></thead></p><fieldset id='M0h19k'></fieldset><b id='M0h19k'><dt id='M0h19k'></dt></b><sup id='M0h19k'></sup><label id='M0h19k'></label><noframes id='M0h19k'><ins id='M0h19k'></ins></noframes><td id='M0h19k'></td><dfn id='M0h19k'></dfn><font id='M0h19k'><style id='M0h19k'></style></font><tr id='M0h19k'><td id='M0h19k'></td></tr><dfn id='M0h19k'><ul id='M0h19k'></ul></dfn><tr id='M0h19k'></tr><abbr id='M0h19k'></abbr><strong id='M0h19k'></strong><dt id='M0h19k'></dt><span id='M0h19k'><label id='M0h19k'><td id='M0h19k'></td></label><address id='M0h19k'></address></span><label id='M0h19k'><bdo id='M0h19k'><dt id='M0h19k'><dl id='M0h19k'></dl></dt></bdo></label><abbr id='M0h19k'><optgroup id='M0h19k'></optgroup></abbr><code id='M0h19k'></code><address id='M0h19k'><thead id='M0h19k'></thead></address><td id='M0h19k'><style id='M0h19k'><tbody id='M0h19k'></tbody><strong id='M0h19k'></strong></style></td><ul id='M0h19k'><ul id='M0h19k'></ul></ul><del id='M0h19k'></del><th id='M0h19k'><option id='M0h19k'><legend id='M0h19k'></legend></option></th><b id='M0h19k'></b><i id='M0h19k'><noscript id='M0h19k'></noscript></i><q id='M0h19k'></q><select id='M0h19k'></select><option id='M0h19k'></option><optgroup id='M0h19k'><big id='M0h19k'></big></optgroup><noframes id='M0h19k'><acronym id='M0h19k'><em id='M0h19k'></em><td id='M0h19k'><div id='M0h19k'></div></td></acronym><address id='M0h19k'><big id='M0h19k'><big id='M0h19k'></big><legend id='M0h19k'></legend></big></address></noframes><ul id='M0h19k'></ul><abbr id='M0h19k'><p id='M0h19k'><small id='M0h19k'><bdo id='M0h19k'><code id='M0h19k'><i id='M0h19k'><legend id='M0h19k'></legend></i><sub id='M0h19k'></sub></code></bdo></small></p></abbr><noscript id='M0h19k'></noscript><tr id='M0h19k'></tr><select id='M0h19k'><button id='M0h19k'><dfn id='M0h19k'><p id='M0h19k'></p><q id='M0h19k'></q></dfn></button><noframes id='M0h19k'></noframes><b id='M0h19k'></b></select><font id='M0h19k'></font><option id='M0h19k'></option><fieldset id='M0h19k'></fieldset><noframes id='M0h19k'><i id='M0h19k'><div id='M0h19k'><ins id='M0h19k'></ins></div></i></noframes><tr id='M0h19k'></tr><label id='M0h19k'><small id='M0h19k'></small><b id='M0h19k'></b></label><noscript id='M0h19k'><tr id='M0h19k'></tr><div id='M0h19k'></div><noscript id='M0h19k'></noscript><tr id='M0h19k'></tr></noscript><center id='M0h19k'></center><dl id='M0h19k'></dl><blockquote id='M0h19k'></blockquote><pre id='M0h19k'><dl id='M0h19k'><noframes id='M0h19k'><i id='M0h19k'></i></noframes><dt id='M0h19k'></dt></dl><label id='M0h19k'><dfn id='M0h19k'></dfn></label></pre><dir id='M0h19k'></dir><strike id='M0h19k'></strike><thead id='M0h19k'></thead><span id='M0h19k'></span><i id='M0h19k'></i><font id='M0h19k'></font><style id='M0h19k'></style><font id='M0h19k'></font><td id='M0h19k'><select id='M0h19k'><b id='M0h19k'><address id='M0h19k'><noscript id='M0h19k'><acronym id='M0h19k'></acronym></noscript></address><style id='M0h19k'><tbody id='M0h19k'></tbody></style></b></select><ul id='M0h19k'><thead id='M0h19k'></thead></ul></td><strike id='M0h19k'><dt id='M0h19k'></dt></strike><dfn id='M0h19k'></dfn><dir id='M0h19k'><b id='M0h19k'></b><font id='M0h19k'></font></dir><ul id='M0h19k'></ul><q id='M0h19k'></q><acronym id='M0h19k'></acronym><center id='M0h19k'><strong id='M0h19k'></strong></center><ins id='M0h19k'><label id='M0h19k'></label><span id='M0h19k'></span></ins><li id='M0h19k'><blockquote id='M0h19k'></blockquote></li><th id='M0h19k'><table id='M0h19k'></table></th><tfoot id='M0h19k'></tfoot><ins id='M0h19k'></ins><table id='M0h19k'></table><noscript id='M0h19k'><del id='M0h19k'><ol id='M0h19k'><center id='M0h19k'><ul id='M0h19k'></ul><div id='M0h19k'></div></center></ol></del></noscript><strong id='M0h19k'><legend id='M0h19k'></legend><td id='M0h19k'></td></strong><font id='M0h19k'><font id='M0h19k'></font></font><noscript id='M0h19k'><em id='M0h19k'><form id='M0h19k'><sub id='M0h19k'></sub></form><bdo id='M0h19k'></bdo></em></noscript><address id='M0h19k'></address><center id='M0h19k'><del id='M0h19k'></del><sup id='M0h19k'></sup></center><kbd id='M0h19k'></kbd><font id='M0h19k'><b id='M0h19k'></b><table id='M0h19k'></table><blockquote id='M0h19k'></blockquote></font><big id='M0h19k'><q id='M0h19k'><center id='M0h19k'><button id='M0h19k'></button></center></q></big><i id='M0h19k'><form id='M0h19k'><option id='M0h19k'></option><dir id='M0h19k'><thead id='M0h19k'></thead></dir></form><tr id='M0h19k'><strike id='M0h19k'><noframes id='M0h19k'><dl id='M0h19k'></dl></noframes></strike><dt id='M0h19k'></dt></tr></i><dfn id='M0h19k'></dfn><tbody id='M0h19k'></tbody><select id='M0h19k'><dir id='M0h19k'><noscript id='M0h19k'><th id='M0h19k'><strike id='M0h19k'></strike><small id='M0h19k'></small></th></noscript><tbody id='M0h19k'><em id='M0h19k'><optgroup id='M0h19k'></optgroup><style id='M0h19k'><tr id='M0h19k'></tr><address id='M0h19k'></address></style></em></tbody><code id='M0h19k'><noscript id='M0h19k'><ins id='M0h19k'><font id='M0h19k'></font></ins></noscript></code></dir><p id='M0h19k'></p><dl id='M0h19k'></dl></select><form id='M0h19k'><bdo id='M0h19k'></bdo><optgroup id='M0h19k'><tbody id='M0h19k'></tbody></optgroup><blockquote id='M0h19k'><button id='M0h19k'><pre id='M0h19k'><li id='M0h19k'><tfoot id='M0h19k'><kbd id='M0h19k'></kbd></tfoot><fieldset id='M0h19k'><dd id='M0h19k'></dd></fieldset></li></pre></button><table id='M0h19k'></table><span id='M0h19k'><dl id='M0h19k'></dl></span></blockquote></form><em id='M0h19k'><small id='M0h19k'><blockquote id='M0h19k'></blockquote></small></em><tfoot id='M0h19k'></tfoot><del id='M0h19k'><pre id='M0h19k'></pre></del><em id='M0h19k'><acronym id='M0h19k'><th id='M0h19k'></th></acronym></em><fieldset id='M0h19k'></fieldset><code id='M0h19k'><noframes id='M0h19k'></noframes></code><form id='M0h19k'><optgroup id='M0h19k'><dir id='M0h19k'></dir></optgroup></form><strong id='M0h19k'></strong><ins id='M0h19k'><option id='M0h19k'></option></ins><dd id='M0h19k'></dd><span id='M0h19k'><tbody id='M0h19k'></tbody></span><strong id='M0h19k'><pre id='M0h19k'><form id='M0h19k'></form></pre></strong><li id='M0h19k'><abbr id='M0h19k'><dir id='M0h19k'></dir><acronym id='M0h19k'></acronym></abbr></li><ol id='M0h19k'></ol><strike id='M0h19k'></strike><label id='M0h19k'></label><legend id='M0h19k'><address id='M0h19k'><thead id='M0h19k'><tr id='M0h19k'></tr></thead></address><dt id='M0h19k'></dt></legend><thead id='M0h19k'></thead><ins id='M0h19k'><big id='M0h19k'></big></ins><kbd id='M0h19k'></kbd><center id='M0h19k'><acronym id='M0h19k'></acronym><code id='M0h19k'></code></center><ul id='M0h19k'><pre id='M0h19k'></pre></ul><style id='M0h19k'><dt id='M0h19k'><noframes id='M0h19k'></noframes></dt><sub id='M0h19k'></sub><b id='M0h19k'><thead id='M0h19k'></thead></b></style><center id='M0h19k'></center><button id='M0h19k'></button><bdo id='M0h19k'><sub id='M0h19k'><noframes id='M0h19k'><blockquote id='M0h19k'><q id='M0h19k'><noscript id='M0h19k'></noscript><dt id='M0h19k'></dt></q></blockquote><noframes id='M0h19k'><i id='M0h19k'></i></noframes></noframes></sub></bdo></div> <!--癑ֺ地图容e--> <div style="width:1000px;height:555px;" id="dituContent"></div> <!-- 0 0 - 9 . n e t --></body> <script type="text/javascript"> //创徏咺ֲѵ初始化地图函数Q? function initMap() { createMap(); //创WpĿͨt地图 setMapEvent(); //讄地图事g addMapControl(); //向地图添加控? addMarker(); //向地图中dmarker } //创徏在图函数Q? function createMap() { var map = new BMap.Map("dituContent"); //在百度地囑֮器中创徏一个地? var point = new BMap.Point(121.36551, 30.784781); //定义一个中心点坷һ标 map.centerAndZoom(point, 18); //讑֮地图的中心点和坐标ƈ地图显C在地图容器? window.map = map; //map变量存储在全局 } //地图事g讄函数Q? function setMapEvent() { map.enableDragging(); //启用地图拖拽事gQ默认启?可不? map.enableScrollWheelZoom(); //启用地图滚轮攑֤~小 map.enableDoubleClickZoom(); //启用鼨u标双击攑֤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); //向地图中淨yd~略图樓? var ctrl_ove = new BMap.OverviewMapControl({ anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 0 }); map.addControl(ctrl_ove); //向Lҿ图中d比例控? var ctrl_sca = new BMap.ScaleControl({ anchor: BMAP_ANCHOR_BOTTOM_LEFT }); map.addControl(ctrl_sca); } //标注Ҏоl? var markerArr = [{ title: "上v天强U织朡̉限公司", content: "地址Q上市釽Y֮sɑ山Z卫公?185?br/>电话Q?21-57247028    <br/>传真Q?21-57247196Q?21-57247681<br/>邮编Q?01508", point: "121.364885|30.784664", isOpen: 1, 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://app.baidu.com/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>