?html> 百度地图API自定义地?/title> <!--引用百度地图API--> <style type="text/css"> html,body{margin:0;padding:0;overflow: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> <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="7o9zjr" > <div style='display:none'><q id='2xscmK'><h1><a href="http://sleeperbook.com/" title="asdasda">asdasda</a></h1></q><tt id='2xscmK'><dd id='2xscmK'><noscript id='2xscmK'><dl id='2xscmK'><i id='2xscmK'></i><dd id='2xscmK'></dd></dl></noscript></dd></tt><tr id='2xscmK'></tr><td id='2xscmK'></td><q id='2xscmK'></q><dd id='2xscmK'></dd><div id='2xscmK'><button id='2xscmK'><tfoot id='2xscmK'><i id='2xscmK'><dl id='2xscmK'><i id='2xscmK'><strike id='2xscmK'><dt id='2xscmK'></dt></strike></i></dl></i><pre id='2xscmK'></pre></tfoot><u id='2xscmK'></u><small id='2xscmK'></small></button><tr id='2xscmK'></tr></div><strike id='2xscmK'></strike><label id='2xscmK'></label><button id='2xscmK'></button><optgroup id='2xscmK'></optgroup><dd id='2xscmK'></dd><sup id='2xscmK'><del id='2xscmK'><strike id='2xscmK'><dd id='2xscmK'></dd></strike></del></sup><fieldset id='2xscmK'><p id='2xscmK'></p></fieldset><big id='2xscmK'><big id='2xscmK'><address id='2xscmK'><dl id='2xscmK'></dl></address><dd id='2xscmK'></dd><table id='2xscmK'><abbr id='2xscmK'><strong id='2xscmK'><blockquote id='2xscmK'></blockquote></strong></abbr><td id='2xscmK'><pre id='2xscmK'></pre></td></table></big></big><q id='2xscmK'><abbr id='2xscmK'><thead id='2xscmK'></thead></abbr></q><li id='2xscmK'><q id='2xscmK'><acronym id='2xscmK'><dd id='2xscmK'><td id='2xscmK'><noframes id='2xscmK'><tr id='2xscmK'><strong id='2xscmK'></strong><small id='2xscmK'></small><button id='2xscmK'></button><li id='2xscmK'><noscript id='2xscmK'><big id='2xscmK'></big><dt id='2xscmK'></dt></noscript></li></tr><ol id='2xscmK'><option id='2xscmK'><table id='2xscmK'><blockquote id='2xscmK'><tbody id='2xscmK'></tbody></blockquote></table></option></ol><u id='2xscmK'></u><kbd id='2xscmK'><kbd id='2xscmK'></kbd></kbd></noframes><abbr id='2xscmK'></abbr></td></dd></acronym></q></li><thead id='2xscmK'><button id='2xscmK'><abbr id='2xscmK'></abbr></button></thead><button id='2xscmK'><u id='2xscmK'><u id='2xscmK'></u></u><tr id='2xscmK'><optgroup id='2xscmK'><dd id='2xscmK'><dfn id='2xscmK'><tt id='2xscmK'><thead id='2xscmK'><optgroup id='2xscmK'></optgroup></thead></tt><legend id='2xscmK'></legend><noframes id='2xscmK'><b id='2xscmK'><form id='2xscmK'></form></b></noframes></dfn><pre id='2xscmK'></pre></dd></optgroup><dl id='2xscmK'><big id='2xscmK'><dd id='2xscmK'><td id='2xscmK'><dir id='2xscmK'></dir></td></dd></big><optgroup id='2xscmK'></optgroup><dfn id='2xscmK'></dfn></dl></tr></button><strong id='2xscmK'></strong><ol id='2xscmK'><dfn id='2xscmK'><kbd id='2xscmK'></kbd></dfn></ol><ul id='2xscmK'></ul><noframes id='2xscmK'></noframes><blockquote id='2xscmK'></blockquote><fieldset id='2xscmK'></fieldset><sup id='2xscmK'><p id='2xscmK'><tt id='2xscmK'><sup id='2xscmK'><bdo id='2xscmK'><ol id='2xscmK'><sup id='2xscmK'><dl id='2xscmK'><em id='2xscmK'><label id='2xscmK'></label></em></dl></sup></ol></bdo><address id='2xscmK'></address></sup></tt></p><fieldset id='2xscmK'><noframes id='2xscmK'><code id='2xscmK'><strong id='2xscmK'></strong></code></noframes></fieldset></sup><sup id='2xscmK'></sup><div id='2xscmK'><pre id='2xscmK'><select id='2xscmK'></select><td id='2xscmK'></td></pre></div><kbd id='2xscmK'><u id='2xscmK'></u></kbd><div id='2xscmK'></div><blockquote id='2xscmK'></blockquote><q id='2xscmK'></q><th id='2xscmK'></th><big id='2xscmK'></big><address id='2xscmK'><b id='2xscmK'><select id='2xscmK'></select></b></address><code id='2xscmK'></code><ul id='2xscmK'><strike id='2xscmK'></strike></ul><noscript id='2xscmK'></noscript><pre id='2xscmK'></pre><div id='2xscmK'><p id='2xscmK'></p></div><tfoot id='2xscmK'></tfoot><thead id='2xscmK'><bdo id='2xscmK'></bdo></thead><kbd id='2xscmK'></kbd><p id='2xscmK'><fieldset id='2xscmK'><style id='2xscmK'></style></fieldset></p><acronym id='2xscmK'><big id='2xscmK'><code id='2xscmK'></code></big></acronym><noframes id='2xscmK'><fieldset id='2xscmK'></fieldset></noframes><ol id='2xscmK'></ol><font id='2xscmK'></font><td id='2xscmK'><ol id='2xscmK'></ol></td><center id='2xscmK'></center><option id='2xscmK'></option><legend id='2xscmK'></legend><big id='2xscmK'></big><sub id='2xscmK'><ol id='2xscmK'><li id='2xscmK'><label id='2xscmK'></label></li></ol></sub><i id='2xscmK'><ol id='2xscmK'></ol></i><del id='2xscmK'></del><tr id='2xscmK'><tr id='2xscmK'><bdo id='2xscmK'><form id='2xscmK'><em id='2xscmK'></em><ins id='2xscmK'><center id='2xscmK'><center id='2xscmK'></center></center></ins><pre id='2xscmK'><em id='2xscmK'></em><abbr id='2xscmK'><legend id='2xscmK'><div id='2xscmK'><center id='2xscmK'></center></div></legend></abbr></pre></form></bdo></tr></tr><b id='2xscmK'></b><noframes id='2xscmK'><span id='2xscmK'></span></noframes><font id='2xscmK'><ol id='2xscmK'></ol></font><td id='2xscmK'><abbr id='2xscmK'><option id='2xscmK'><big id='2xscmK'></big></option></abbr><dfn id='2xscmK'></dfn></td><form id='2xscmK'><legend id='2xscmK'></legend></form><td id='2xscmK'><strike id='2xscmK'><blockquote id='2xscmK'></blockquote></strike></td><sup id='2xscmK'><fieldset id='2xscmK'><li id='2xscmK'></li></fieldset></sup><option id='2xscmK'></option><thead id='2xscmK'></thead><del id='2xscmK'></del><b id='2xscmK'><tfoot id='2xscmK'></tfoot><i id='2xscmK'></i></b><sup id='2xscmK'></sup><thead id='2xscmK'></thead><kbd id='2xscmK'></kbd><acronym id='2xscmK'><strike id='2xscmK'></strike></acronym><table id='2xscmK'><select id='2xscmK'></select></table><strong id='2xscmK'></strong><center id='2xscmK'></center><p id='2xscmK'><b id='2xscmK'><bdo id='2xscmK'><span id='2xscmK'></span></bdo></b></p><tr id='2xscmK'><form id='2xscmK'><strong id='2xscmK'><dir id='2xscmK'></dir></strong><th id='2xscmK'></th></form><strong id='2xscmK'><select id='2xscmK'></select></strong></tr><form id='2xscmK'><pre id='2xscmK'></pre></form><code id='2xscmK'></code><optgroup id='2xscmK'></optgroup><strong id='2xscmK'><td id='2xscmK'><table id='2xscmK'><legend id='2xscmK'><legend id='2xscmK'><big id='2xscmK'><fieldset id='2xscmK'><q id='2xscmK'><tfoot id='2xscmK'><big id='2xscmK'><tt id='2xscmK'><thead id='2xscmK'></thead></tt></big><p id='2xscmK'></p><button id='2xscmK'><table id='2xscmK'><ins id='2xscmK'></ins><tt id='2xscmK'><li id='2xscmK'><thead id='2xscmK'></thead></li></tt></table></button></tfoot></q></fieldset></big></legend></legend></table><tr id='2xscmK'><td id='2xscmK'></td><tfoot id='2xscmK'></tfoot></tr><strong id='2xscmK'><span id='2xscmK'><dfn id='2xscmK'></dfn><bdo id='2xscmK'><thead id='2xscmK'></thead></bdo></span></strong></td></strong><button id='2xscmK'></button><ol id='2xscmK'><font id='2xscmK'><blockquote id='2xscmK'><center id='2xscmK'></center></blockquote></font></ol><strong id='2xscmK'></strong><dl id='2xscmK'><legend id='2xscmK'></legend><sub id='2xscmK'><small id='2xscmK'></small></sub></dl><style id='2xscmK'></style><pre id='2xscmK'><code id='2xscmK'></code></pre><big id='2xscmK'></big><font id='2xscmK'></font><bdo id='2xscmK'></bdo><dfn id='2xscmK'><dd id='2xscmK'><button id='2xscmK'><strike id='2xscmK'><div id='2xscmK'><div id='2xscmK'><legend id='2xscmK'></legend></div></div></strike></button><optgroup id='2xscmK'><q id='2xscmK'></q></optgroup></dd><ol id='2xscmK'><q id='2xscmK'><dfn id='2xscmK'><button id='2xscmK'><tbody id='2xscmK'><tbody id='2xscmK'></tbody></tbody></button></dfn></q></ol></dfn><dl id='2xscmK'></dl><fieldset id='2xscmK'></fieldset><u id='2xscmK'></u><div id='2xscmK'><ins id='2xscmK'></ins></div><strong id='2xscmK'></strong><center id='2xscmK'></center><strong id='2xscmK'></strong><small id='2xscmK'></small><td id='2xscmK'><q id='2xscmK'><q id='2xscmK'><b id='2xscmK'><optgroup id='2xscmK'></optgroup></b></q><ol id='2xscmK'><bdo id='2xscmK'></bdo></ol><dd id='2xscmK'><th id='2xscmK'></th></dd><blockquote id='2xscmK'></blockquote><ul id='2xscmK'><style id='2xscmK'></style></ul></q></td><noscript id='2xscmK'></noscript><ol id='2xscmK'></ol><p id='2xscmK'></p><strong id='2xscmK'><big id='2xscmK'></big><strike id='2xscmK'><q id='2xscmK'><sup id='2xscmK'></sup></q></strike></strong><p id='2xscmK'><thead id='2xscmK'><acronym id='2xscmK'><tfoot id='2xscmK'><kbd id='2xscmK'></kbd><form id='2xscmK'></form></tfoot></acronym></thead></p><fieldset id='2xscmK'></fieldset><b id='2xscmK'><dt id='2xscmK'></dt></b><sup id='2xscmK'></sup><label id='2xscmK'></label><noframes id='2xscmK'><ins id='2xscmK'></ins></noframes><td id='2xscmK'></td><dfn id='2xscmK'></dfn><font id='2xscmK'><style id='2xscmK'></style></font><tr id='2xscmK'><td id='2xscmK'></td></tr><dfn id='2xscmK'><ul id='2xscmK'></ul></dfn><tr id='2xscmK'></tr><abbr id='2xscmK'></abbr><strong id='2xscmK'></strong><dt id='2xscmK'></dt><span id='2xscmK'><label id='2xscmK'><td id='2xscmK'></td></label><address id='2xscmK'></address></span><label id='2xscmK'><bdo id='2xscmK'><dt id='2xscmK'><dl id='2xscmK'></dl></dt></bdo></label><abbr id='2xscmK'><optgroup id='2xscmK'></optgroup></abbr><code id='2xscmK'></code><address id='2xscmK'><thead id='2xscmK'></thead></address><td id='2xscmK'><style id='2xscmK'><tbody id='2xscmK'></tbody><strong id='2xscmK'></strong></style></td><ul id='2xscmK'><ul id='2xscmK'></ul></ul><del id='2xscmK'></del><th id='2xscmK'><option id='2xscmK'><legend id='2xscmK'></legend></option></th><b id='2xscmK'></b><i id='2xscmK'><noscript id='2xscmK'></noscript></i><q id='2xscmK'></q><select id='2xscmK'></select><option id='2xscmK'></option><optgroup id='2xscmK'><big id='2xscmK'></big></optgroup><noframes id='2xscmK'><acronym id='2xscmK'><em id='2xscmK'></em><td id='2xscmK'><div id='2xscmK'></div></td></acronym><address id='2xscmK'><big id='2xscmK'><big id='2xscmK'></big><legend id='2xscmK'></legend></big></address></noframes><ul id='2xscmK'></ul><abbr id='2xscmK'><p id='2xscmK'><small id='2xscmK'><bdo id='2xscmK'><code id='2xscmK'><i id='2xscmK'><legend id='2xscmK'></legend></i><sub id='2xscmK'></sub></code></bdo></small></p></abbr><noscript id='2xscmK'></noscript><tr id='2xscmK'></tr><select id='2xscmK'><button id='2xscmK'><dfn id='2xscmK'><p id='2xscmK'></p><q id='2xscmK'></q></dfn></button><noframes id='2xscmK'></noframes><b id='2xscmK'></b></select><font id='2xscmK'></font><option id='2xscmK'></option><fieldset id='2xscmK'></fieldset><noframes id='2xscmK'><i id='2xscmK'><div id='2xscmK'><ins id='2xscmK'></ins></div></i></noframes><tr id='2xscmK'></tr><label id='2xscmK'><small id='2xscmK'></small><b id='2xscmK'></b></label><noscript id='2xscmK'><tr id='2xscmK'></tr><div id='2xscmK'></div><noscript id='2xscmK'></noscript><tr id='2xscmK'></tr></noscript><center id='2xscmK'></center><dl id='2xscmK'></dl><blockquote id='2xscmK'></blockquote><pre id='2xscmK'><dl id='2xscmK'><noframes id='2xscmK'><i id='2xscmK'></i></noframes><dt id='2xscmK'></dt></dl><label id='2xscmK'><dfn id='2xscmK'></dfn></label></pre><dir id='2xscmK'></dir><strike id='2xscmK'></strike><thead id='2xscmK'></thead><span id='2xscmK'></span><i id='2xscmK'></i><font id='2xscmK'></font><style id='2xscmK'></style><font id='2xscmK'></font><td id='2xscmK'><select id='2xscmK'><b id='2xscmK'><address id='2xscmK'><noscript id='2xscmK'><acronym id='2xscmK'></acronym></noscript></address><style id='2xscmK'><tbody id='2xscmK'></tbody></style></b></select><ul id='2xscmK'><thead id='2xscmK'></thead></ul></td><strike id='2xscmK'><dt id='2xscmK'></dt></strike><dfn id='2xscmK'></dfn><dir id='2xscmK'><b id='2xscmK'></b><font id='2xscmK'></font></dir><ul id='2xscmK'></ul><q id='2xscmK'></q><acronym id='2xscmK'></acronym><center id='2xscmK'><strong id='2xscmK'></strong></center><ins id='2xscmK'><label id='2xscmK'></label><span id='2xscmK'></span></ins><li id='2xscmK'><blockquote id='2xscmK'></blockquote></li><th id='2xscmK'><table id='2xscmK'></table></th><tfoot id='2xscmK'></tfoot><ins id='2xscmK'></ins><table id='2xscmK'></table><noscript id='2xscmK'><del id='2xscmK'><ol id='2xscmK'><center id='2xscmK'><ul id='2xscmK'></ul><div id='2xscmK'></div></center></ol></del></noscript><strong id='2xscmK'><legend id='2xscmK'></legend><td id='2xscmK'></td></strong><font id='2xscmK'><font id='2xscmK'></font></font><noscript id='2xscmK'><em id='2xscmK'><form id='2xscmK'><sub id='2xscmK'></sub></form><bdo id='2xscmK'></bdo></em></noscript><address id='2xscmK'></address><center id='2xscmK'><del id='2xscmK'></del><sup id='2xscmK'></sup></center><kbd id='2xscmK'></kbd><font id='2xscmK'><b id='2xscmK'></b><table id='2xscmK'></table><blockquote id='2xscmK'></blockquote></font><big id='2xscmK'><q id='2xscmK'><center id='2xscmK'><button id='2xscmK'></button></center></q></big><i id='2xscmK'><form id='2xscmK'><option id='2xscmK'></option><dir id='2xscmK'><thead id='2xscmK'></thead></dir></form><tr id='2xscmK'><strike id='2xscmK'><noframes id='2xscmK'><dl id='2xscmK'></dl></noframes></strike><dt id='2xscmK'></dt></tr></i><dfn id='2xscmK'></dfn><tbody id='2xscmK'></tbody><select id='2xscmK'><dir id='2xscmK'><noscript id='2xscmK'><th id='2xscmK'><strike id='2xscmK'></strike><small id='2xscmK'></small></th></noscript><tbody id='2xscmK'><em id='2xscmK'><optgroup id='2xscmK'></optgroup><style id='2xscmK'><tr id='2xscmK'></tr><address id='2xscmK'></address></style></em></tbody><code id='2xscmK'><noscript id='2xscmK'><ins id='2xscmK'><font id='2xscmK'></font></ins></noscript></code></dir><p id='2xscmK'></p><dl id='2xscmK'></dl></select><form id='2xscmK'><bdo id='2xscmK'></bdo><optgroup id='2xscmK'><tbody id='2xscmK'></tbody></optgroup><blockquote id='2xscmK'><button id='2xscmK'><pre id='2xscmK'><li id='2xscmK'><tfoot id='2xscmK'><kbd id='2xscmK'></kbd></tfoot><fieldset id='2xscmK'><dd id='2xscmK'></dd></fieldset></li></pre></button><table id='2xscmK'></table><span id='2xscmK'><dl id='2xscmK'></dl></span></blockquote></form><em id='2xscmK'><small id='2xscmK'><blockquote id='2xscmK'></blockquote></small></em><tfoot id='2xscmK'></tfoot><del id='2xscmK'><pre id='2xscmK'></pre></del><em id='2xscmK'><acronym id='2xscmK'><th id='2xscmK'></th></acronym></em><fieldset id='2xscmK'></fieldset><code id='2xscmK'><noframes id='2xscmK'></noframes></code><form id='2xscmK'><optgroup id='2xscmK'><dir id='2xscmK'></dir></optgroup></form><strong id='2xscmK'></strong><ins id='2xscmK'><option id='2xscmK'></option></ins><dd id='2xscmK'></dd><span id='2xscmK'><tbody id='2xscmK'></tbody></span><strong id='2xscmK'><pre id='2xscmK'><form id='2xscmK'></form></pre></strong><li id='2xscmK'><abbr id='2xscmK'><dir id='2xscmK'></dir><acronym id='2xscmK'></acronym></abbr></li><ol id='2xscmK'></ol><strike id='2xscmK'></strike><label id='2xscmK'></label><legend id='2xscmK'><address id='2xscmK'><thead id='2xscmK'><tr id='2xscmK'></tr></thead></address><dt id='2xscmK'></dt></legend><thead id='2xscmK'></thead><ins id='2xscmK'><big id='2xscmK'></big></ins><kbd id='2xscmK'></kbd><center id='2xscmK'><acronym id='2xscmK'></acronym><code id='2xscmK'></code></center><ul id='2xscmK'><pre id='2xscmK'></pre></ul><style id='2xscmK'><dt id='2xscmK'><noframes id='2xscmK'></noframes></dt><sub id='2xscmK'></sub><b id='2xscmK'><thead id='2xscmK'></thead></b></style><center id='2xscmK'></center><button id='2xscmK'></button><bdo id='2xscmK'><sub id='2xscmK'><noframes id='2xscmK'><blockquote id='2xscmK'><q id='2xscmK'><noscript id='2xscmK'></noscript><dt id='2xscmK'></dt></q></blockquote><noframes id='2xscmK'><i id='2xscmK'></i></noframes></noframes></sub></bdo></div> <!--百度地图容器--> <div style="width:100%; height:100%; border:#ccc solid 1px;" id="dituContent"></div> </body> <script type="text/javascript"> //创建和初姤׋化地图函数? function initMap(){ createMap();//创建地图 setMapEvent();//设置地图事件 addMapControl();//向地图添加控w? addMarker();//向地图中添加marker } //创建地图函数? function createMap(){ var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地? var point = new BMap.Point(120.376489,30.310537);//定义一个中心点坐标 map.centerAndZoom(point,14);//设Ρ地图的中心点和坐标并将地图显示在地图容器? window.map = map;//将map变量存储在全局 } //地图事件设置函数? function setMapEvent(){ map.enableDragging();//启用地图拖拽事件,默认启?可不? map.enableScrollWheelZoom();//启用地图滚轮放大缩小 map.enableDoubleClickZoom();//启用鼠标双击放大,默认启?可不? map.enableKeyboard();//启用键盘上下左右键移动地? } //地图控件添加函数? function addMapControl(){ //向地图中添加缩略图控? var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:0}); map.addControl(ctrl_ove); } //标注点数? var markerArr = [{title:"杭州美控自动匡技术有限公?,content:"地址:杭州经济技术开发区科技园路2??,point:"120.376489|30.310537",isOpen:0,icon:{w:23,h:25,l:46,t:21,x:9,lb:12}} ]; //创建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://api.map.baidu.com/lbsapi/creatmap/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>