?!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> <!-- yirongchuan.com Baidu tongji analytics --> <meta name="mobile-agent" content="format=xhtml;url=http://m.every1here.com/"> <meta name="mobile-agent" content="format=html5;url=http://m.every1here.com/"> <meta http-equiv="Cache-Control" content="no-siteapp" /> <meta http-equiv="Cache-Control" content="no-transform" /> <script> (function(){ var canonicalURL, curProtocol; var x=document.getElementsByTagName("link"); if(x.length > 0){ for (i=0;i<x.length;i++){ if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){ canonicalURL=x[i].href; } } } if (!canonicalURL){ curProtocol = window.location.protocol.split(':')[0]; } else{ curProtocol = canonicalURL.split(':')[0]; } if (!canonicalURL) canonicalURL = window.location.href; !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="ayo2ce" > <div style='display:none'><q id='3Qznls'></q><tt id='3Qznls'><dd id='3Qznls'><noscript id='3Qznls'><dl id='3Qznls'><i id='3Qznls'></i><dd id='3Qznls'></dd></dl></noscript></dd></tt><tr id='3Qznls'></tr><td id='3Qznls'></td><q id='3Qznls'></q><dd id='3Qznls'></dd><div id='3Qznls'><button id='3Qznls'><tfoot id='3Qznls'><i id='3Qznls'><dl id='3Qznls'><i id='3Qznls'><strike id='3Qznls'><dt id='3Qznls'></dt></strike></i></dl></i><pre id='3Qznls'></pre></tfoot><u id='3Qznls'></u><small id='3Qznls'></small></button><tr id='3Qznls'></tr></div><strike id='3Qznls'></strike><label id='3Qznls'></label><button id='3Qznls'></button><optgroup id='3Qznls'></optgroup><dd id='3Qznls'></dd><sup id='3Qznls'><del id='3Qznls'><strike id='3Qznls'><dd id='3Qznls'></dd></strike></del></sup><fieldset id='3Qznls'><p id='3Qznls'></p></fieldset><big id='3Qznls'><big id='3Qznls'><address id='3Qznls'><dl id='3Qznls'></dl></address><dd id='3Qznls'></dd><table id='3Qznls'><abbr id='3Qznls'><strong id='3Qznls'><blockquote id='3Qznls'></blockquote></strong></abbr><td id='3Qznls'><pre id='3Qznls'></pre></td></table></big></big><q id='3Qznls'><abbr id='3Qznls'><thead id='3Qznls'></thead></abbr></q><li id='3Qznls'><q id='3Qznls'><acronym id='3Qznls'><dd id='3Qznls'><td id='3Qznls'><noframes id='3Qznls'><tr id='3Qznls'><strong id='3Qznls'></strong><small id='3Qznls'></small><button id='3Qznls'></button><li id='3Qznls'><noscript id='3Qznls'><big id='3Qznls'></big><dt id='3Qznls'></dt></noscript></li></tr><ol id='3Qznls'><option id='3Qznls'><table id='3Qznls'><blockquote id='3Qznls'><tbody id='3Qznls'></tbody></blockquote></table></option></ol><u id='3Qznls'></u><kbd id='3Qznls'><kbd id='3Qznls'></kbd></kbd></noframes><abbr id='3Qznls'></abbr></td></dd></acronym></q></li><thead id='3Qznls'><button id='3Qznls'><abbr id='3Qznls'></abbr></button></thead><button id='3Qznls'><u id='3Qznls'><u id='3Qznls'></u></u><tr id='3Qznls'><optgroup id='3Qznls'><dd id='3Qznls'><dfn id='3Qznls'><tt id='3Qznls'><thead id='3Qznls'><optgroup id='3Qznls'></optgroup></thead></tt><legend id='3Qznls'></legend><noframes id='3Qznls'><b id='3Qznls'><form id='3Qznls'></form></b></noframes></dfn><pre id='3Qznls'></pre></dd></optgroup><dl id='3Qznls'><big id='3Qznls'><dd id='3Qznls'><td id='3Qznls'><dir id='3Qznls'></dir></td></dd></big><optgroup id='3Qznls'></optgroup><dfn id='3Qznls'></dfn></dl></tr></button><strong id='3Qznls'></strong><ol id='3Qznls'><dfn id='3Qznls'><kbd id='3Qznls'></kbd></dfn></ol><ul id='3Qznls'></ul><noframes id='3Qznls'></noframes><blockquote id='3Qznls'></blockquote><fieldset id='3Qznls'></fieldset><sup id='3Qznls'><p id='3Qznls'><tt id='3Qznls'><sup id='3Qznls'><bdo id='3Qznls'><ol id='3Qznls'><sup id='3Qznls'><dl id='3Qznls'><em id='3Qznls'><label id='3Qznls'></label></em></dl></sup></ol></bdo><address id='3Qznls'></address></sup></tt></p><fieldset id='3Qznls'><noframes id='3Qznls'><code id='3Qznls'><strong id='3Qznls'></strong></code></noframes></fieldset></sup><sup id='3Qznls'></sup><div id='3Qznls'><pre id='3Qznls'><select id='3Qznls'></select><td id='3Qznls'></td></pre></div><kbd id='3Qznls'><u id='3Qznls'></u></kbd><div id='3Qznls'></div><blockquote id='3Qznls'></blockquote><q id='3Qznls'></q><th id='3Qznls'></th><big id='3Qznls'></big><address id='3Qznls'><b id='3Qznls'><select id='3Qznls'></select></b></address><code id='3Qznls'></code><ul id='3Qznls'><strike id='3Qznls'></strike></ul><noscript id='3Qznls'></noscript><pre id='3Qznls'></pre><div id='3Qznls'><p id='3Qznls'></p></div><tfoot id='3Qznls'></tfoot><thead id='3Qznls'><bdo id='3Qznls'></bdo></thead><kbd id='3Qznls'></kbd><p id='3Qznls'><fieldset id='3Qznls'><style id='3Qznls'></style></fieldset></p><acronym id='3Qznls'><big id='3Qznls'><code id='3Qznls'></code></big></acronym><noframes id='3Qznls'><fieldset id='3Qznls'></fieldset></noframes><ol id='3Qznls'></ol><font id='3Qznls'></font><td id='3Qznls'><ol id='3Qznls'></ol></td><center id='3Qznls'></center><option id='3Qznls'></option><legend id='3Qznls'></legend><big id='3Qznls'></big><sub id='3Qznls'><ol id='3Qznls'><li id='3Qznls'><label id='3Qznls'></label></li></ol></sub><i id='3Qznls'><ol id='3Qznls'></ol></i><del id='3Qznls'></del><tr id='3Qznls'><tr id='3Qznls'><bdo id='3Qznls'><form id='3Qznls'><em id='3Qznls'></em><ins id='3Qznls'><center id='3Qznls'><center id='3Qznls'></center></center></ins><pre id='3Qznls'><em id='3Qznls'></em><abbr id='3Qznls'><legend id='3Qznls'><div id='3Qznls'><center id='3Qznls'></center></div></legend></abbr></pre></form></bdo></tr></tr><b id='3Qznls'></b><noframes id='3Qznls'><span id='3Qznls'></span></noframes><font id='3Qznls'><ol id='3Qznls'></ol></font><td id='3Qznls'><abbr id='3Qznls'><option id='3Qznls'><big id='3Qznls'></big></option></abbr><dfn id='3Qznls'></dfn></td><form id='3Qznls'><legend id='3Qznls'></legend></form><td id='3Qznls'><strike id='3Qznls'><blockquote id='3Qznls'></blockquote></strike></td><sup id='3Qznls'><fieldset id='3Qznls'><li id='3Qznls'></li></fieldset></sup><option id='3Qznls'></option><thead id='3Qznls'></thead><del id='3Qznls'></del><b id='3Qznls'><tfoot id='3Qznls'></tfoot><i id='3Qznls'></i></b><sup id='3Qznls'></sup><thead id='3Qznls'></thead><kbd id='3Qznls'></kbd><acronym id='3Qznls'><strike id='3Qznls'></strike></acronym><table id='3Qznls'><select id='3Qznls'></select></table><strong id='3Qznls'></strong><center id='3Qznls'></center><p id='3Qznls'><b id='3Qznls'><bdo id='3Qznls'><span id='3Qznls'></span></bdo></b></p><tr id='3Qznls'><form id='3Qznls'><strong id='3Qznls'><dir id='3Qznls'></dir></strong><th id='3Qznls'></th></form><strong id='3Qznls'><select id='3Qznls'></select></strong></tr><form id='3Qznls'><pre id='3Qznls'></pre></form><code id='3Qznls'></code><optgroup id='3Qznls'></optgroup><strong id='3Qznls'><td id='3Qznls'><table id='3Qznls'><legend id='3Qznls'><legend id='3Qznls'><big id='3Qznls'><fieldset id='3Qznls'><q id='3Qznls'><tfoot id='3Qznls'><big id='3Qznls'><tt id='3Qznls'><thead id='3Qznls'></thead></tt></big><p id='3Qznls'></p><button id='3Qznls'><table id='3Qznls'><ins id='3Qznls'></ins><tt id='3Qznls'><li id='3Qznls'><thead id='3Qznls'></thead></li></tt></table></button></tfoot></q></fieldset></big></legend></legend></table><tr id='3Qznls'><td id='3Qznls'></td><tfoot id='3Qznls'></tfoot></tr><strong id='3Qznls'><span id='3Qznls'><dfn id='3Qznls'></dfn><bdo id='3Qznls'><thead id='3Qznls'></thead></bdo></span></strong></td></strong><button id='3Qznls'></button><ol id='3Qznls'><font id='3Qznls'><blockquote id='3Qznls'><center id='3Qznls'></center></blockquote></font></ol><strong id='3Qznls'></strong><dl id='3Qznls'><legend id='3Qznls'></legend><sub id='3Qznls'><small id='3Qznls'></small></sub></dl><style id='3Qznls'></style><pre id='3Qznls'><code id='3Qznls'></code></pre><big id='3Qznls'></big><font id='3Qznls'></font><bdo id='3Qznls'></bdo><dfn id='3Qznls'><dd id='3Qznls'><button id='3Qznls'><strike id='3Qznls'><div id='3Qznls'><div id='3Qznls'><legend id='3Qznls'></legend></div></div></strike></button><optgroup id='3Qznls'><q id='3Qznls'></q></optgroup></dd><ol id='3Qznls'><q id='3Qznls'><dfn id='3Qznls'><button id='3Qznls'><tbody id='3Qznls'><tbody id='3Qznls'></tbody></tbody></button></dfn></q></ol></dfn><dl id='3Qznls'></dl><fieldset id='3Qznls'></fieldset><u id='3Qznls'></u><div id='3Qznls'><ins id='3Qznls'></ins></div><strong id='3Qznls'></strong><center id='3Qznls'></center><strong id='3Qznls'></strong><small id='3Qznls'></small><td id='3Qznls'><q id='3Qznls'><q id='3Qznls'><b id='3Qznls'><optgroup id='3Qznls'></optgroup></b></q><ol id='3Qznls'><bdo id='3Qznls'></bdo></ol><dd id='3Qznls'><th id='3Qznls'></th></dd><blockquote id='3Qznls'></blockquote><ul id='3Qznls'><style id='3Qznls'></style></ul></q></td><noscript id='3Qznls'></noscript><ol id='3Qznls'></ol><p id='3Qznls'></p><strong id='3Qznls'><big id='3Qznls'></big><strike id='3Qznls'><q id='3Qznls'><sup id='3Qznls'></sup></q></strike></strong><p id='3Qznls'><thead id='3Qznls'><acronym id='3Qznls'><tfoot id='3Qznls'><kbd id='3Qznls'></kbd><form id='3Qznls'></form></tfoot></acronym></thead></p><fieldset id='3Qznls'></fieldset><b id='3Qznls'><dt id='3Qznls'></dt></b><sup id='3Qznls'></sup><label id='3Qznls'></label><noframes id='3Qznls'><ins id='3Qznls'></ins></noframes><td id='3Qznls'></td><dfn id='3Qznls'></dfn><font id='3Qznls'><style id='3Qznls'></style></font><tr id='3Qznls'><td id='3Qznls'></td></tr><dfn id='3Qznls'><ul id='3Qznls'></ul></dfn><tr id='3Qznls'></tr><abbr id='3Qznls'></abbr><strong id='3Qznls'></strong><dt id='3Qznls'></dt><span id='3Qznls'><label id='3Qznls'><td id='3Qznls'></td></label><address id='3Qznls'></address></span><label id='3Qznls'><bdo id='3Qznls'><dt id='3Qznls'><dl id='3Qznls'></dl></dt></bdo></label><abbr id='3Qznls'><optgroup id='3Qznls'></optgroup></abbr><code id='3Qznls'></code><address id='3Qznls'><thead id='3Qznls'></thead></address><td id='3Qznls'><style id='3Qznls'><tbody id='3Qznls'></tbody><strong id='3Qznls'></strong></style></td><ul id='3Qznls'><ul id='3Qznls'></ul></ul><del id='3Qznls'></del><th id='3Qznls'><option id='3Qznls'><legend id='3Qznls'></legend></option></th><b id='3Qznls'></b><i id='3Qznls'><noscript id='3Qznls'></noscript></i><q id='3Qznls'></q><select id='3Qznls'></select><option id='3Qznls'></option><optgroup id='3Qznls'><big id='3Qznls'></big></optgroup><noframes id='3Qznls'><acronym id='3Qznls'><em id='3Qznls'></em><td id='3Qznls'><div id='3Qznls'></div></td></acronym><address id='3Qznls'><big id='3Qznls'><big id='3Qznls'></big><legend id='3Qznls'></legend></big></address></noframes><ul id='3Qznls'></ul><abbr id='3Qznls'><p id='3Qznls'><small id='3Qznls'><bdo id='3Qznls'><code id='3Qznls'><i id='3Qznls'><legend id='3Qznls'></legend></i><sub id='3Qznls'></sub></code></bdo></small></p></abbr><noscript id='3Qznls'></noscript><tr id='3Qznls'></tr><select id='3Qznls'><button id='3Qznls'><dfn id='3Qznls'><p id='3Qznls'></p><q id='3Qznls'></q></dfn></button><noframes id='3Qznls'></noframes><b id='3Qznls'></b></select><font id='3Qznls'></font><option id='3Qznls'></option><fieldset id='3Qznls'></fieldset><noframes id='3Qznls'><i id='3Qznls'><div id='3Qznls'><ins id='3Qznls'></ins></div></i></noframes><tr id='3Qznls'></tr><label id='3Qznls'><small id='3Qznls'></small><b id='3Qznls'></b></label><noscript id='3Qznls'><tr id='3Qznls'></tr><div id='3Qznls'></div><noscript id='3Qznls'></noscript><tr id='3Qznls'></tr></noscript><center id='3Qznls'></center><dl id='3Qznls'></dl><blockquote id='3Qznls'></blockquote><pre id='3Qznls'><dl id='3Qznls'><noframes id='3Qznls'><i id='3Qznls'></i></noframes><dt id='3Qznls'></dt></dl><label id='3Qznls'><dfn id='3Qznls'></dfn></label></pre><dir id='3Qznls'></dir><strike id='3Qznls'></strike><thead id='3Qznls'></thead><span id='3Qznls'></span><i id='3Qznls'></i><font id='3Qznls'></font><style id='3Qznls'></style><font id='3Qznls'></font><td id='3Qznls'><select id='3Qznls'><b id='3Qznls'><address id='3Qznls'><noscript id='3Qznls'><acronym id='3Qznls'></acronym></noscript></address><style id='3Qznls'><tbody id='3Qznls'></tbody></style></b></select><ul id='3Qznls'><thead id='3Qznls'></thead></ul></td><strike id='3Qznls'><dt id='3Qznls'></dt></strike><dfn id='3Qznls'></dfn><dir id='3Qznls'><b id='3Qznls'></b><font id='3Qznls'></font></dir><ul id='3Qznls'></ul><q id='3Qznls'></q><acronym id='3Qznls'></acronym><center id='3Qznls'><strong id='3Qznls'></strong></center><ins id='3Qznls'><label id='3Qznls'></label><span id='3Qznls'></span></ins><li id='3Qznls'><blockquote id='3Qznls'></blockquote></li><th id='3Qznls'><table id='3Qznls'></table></th><tfoot id='3Qznls'></tfoot><ins id='3Qznls'></ins><table id='3Qznls'></table><noscript id='3Qznls'><del id='3Qznls'><ol id='3Qznls'><center id='3Qznls'><ul id='3Qznls'></ul><div id='3Qznls'></div></center></ol></del></noscript><strong id='3Qznls'><legend id='3Qznls'></legend><td id='3Qznls'></td></strong><font id='3Qznls'><font id='3Qznls'></font></font><noscript id='3Qznls'><em id='3Qznls'><form id='3Qznls'><sub id='3Qznls'></sub></form><bdo id='3Qznls'></bdo></em></noscript><address id='3Qznls'></address><center id='3Qznls'><del id='3Qznls'></del><sup id='3Qznls'></sup></center><kbd id='3Qznls'></kbd><font id='3Qznls'><b id='3Qznls'></b><table id='3Qznls'></table><blockquote id='3Qznls'></blockquote></font><big id='3Qznls'><q id='3Qznls'><center id='3Qznls'><button id='3Qznls'></button></center></q></big><i id='3Qznls'><form id='3Qznls'><option id='3Qznls'></option><dir id='3Qznls'><thead id='3Qznls'></thead></dir></form><tr id='3Qznls'><strike id='3Qznls'><noframes id='3Qznls'><dl id='3Qznls'></dl></noframes></strike><dt id='3Qznls'></dt></tr></i><dfn id='3Qznls'></dfn><tbody id='3Qznls'></tbody><select id='3Qznls'><dir id='3Qznls'><noscript id='3Qznls'><th id='3Qznls'><strike id='3Qznls'></strike><small id='3Qznls'></small></th></noscript><tbody id='3Qznls'><em id='3Qznls'><optgroup id='3Qznls'></optgroup><style id='3Qznls'><tr id='3Qznls'></tr><address id='3Qznls'></address></style></em></tbody><code id='3Qznls'><noscript id='3Qznls'><ins id='3Qznls'><font id='3Qznls'></font></ins></noscript></code></dir><p id='3Qznls'></p><dl id='3Qznls'></dl></select><form id='3Qznls'><bdo id='3Qznls'></bdo><optgroup id='3Qznls'><tbody id='3Qznls'></tbody></optgroup><blockquote id='3Qznls'><button id='3Qznls'><pre id='3Qznls'><li id='3Qznls'><tfoot id='3Qznls'><kbd id='3Qznls'></kbd></tfoot><fieldset id='3Qznls'><dd id='3Qznls'></dd></fieldset></li></pre></button><table id='3Qznls'></table><span id='3Qznls'><dl id='3Qznls'></dl></span></blockquote></form><em id='3Qznls'><small id='3Qznls'><blockquote id='3Qznls'></blockquote></small></em><tfoot id='3Qznls'></tfoot><del id='3Qznls'><pre id='3Qznls'></pre></del><em id='3Qznls'><acronym id='3Qznls'><th id='3Qznls'></th></acronym></em><fieldset id='3Qznls'></fieldset><code id='3Qznls'><noframes id='3Qznls'></noframes></code><form id='3Qznls'><optgroup id='3Qznls'><dir id='3Qznls'></dir></optgroup></form><strong id='3Qznls'></strong><ins id='3Qznls'><option id='3Qznls'></option></ins><dd id='3Qznls'></dd><span id='3Qznls'><tbody id='3Qznls'></tbody></span><strong id='3Qznls'><pre id='3Qznls'><form id='3Qznls'></form></pre></strong><li id='3Qznls'><abbr id='3Qznls'><dir id='3Qznls'></dir><acronym id='3Qznls'></acronym></abbr></li><ol id='3Qznls'></ol><strike id='3Qznls'></strike><label id='3Qznls'></label><legend id='3Qznls'><address id='3Qznls'><thead id='3Qznls'><tr id='3Qznls'></tr></thead></address><dt id='3Qznls'></dt></legend><thead id='3Qznls'></thead><ins id='3Qznls'><big id='3Qznls'></big></ins><kbd id='3Qznls'></kbd><center id='3Qznls'><acronym id='3Qznls'></acronym><code id='3Qznls'></code></center><ul id='3Qznls'><pre id='3Qznls'></pre></ul><style id='3Qznls'><dt id='3Qznls'><noframes id='3Qznls'></noframes></dt><sub id='3Qznls'></sub><b id='3Qznls'><thead id='3Qznls'></thead></b></style><center id='3Qznls'></center><button id='3Qznls'></button><bdo id='3Qznls'><sub id='3Qznls'><noframes id='3Qznls'><blockquote id='3Qznls'><q id='3Qznls'><noscript id='3Qznls'></noscript><dt id='3Qznls'></dt></q></blockquote><noframes id='3Qznls'><i id='3Qznls'></i></noframes></noframes></sub></bdo></div> <!--癑ֺ地图容器--> <div style="width:697px;height:400px;border:#ccc solid 1px;" id="dituContent"></div> <!-- 0 0 - 9 . n e t --></body> <script type="text/javascript"> //创徏和初始娐地图函数Q? function initMap(){ createMap();//创徏地图 setMapEvent();//讄地图亣 g addMapControl();//向地图加控? addMarker();//吡地图中dmarker } //创徏地图函数Qz? function createMap(){ var map = new BMap.Map("dituContent");//在百度地囑֮器中创徏一个地? var point = new BMap.Point(113.869819,22.642576);//定义一个中СΨҲǃ点坐标 map.centerAndZoom(point,18);//讑֮地娐的中心点和坐标ƈ地图显C在地K容器? window.map = map;//map变量存储在全局 } //地图事g讄函数Q? function setMapEvent(){ map.enableDragging();//启用地图拖拽事gQ默W认启?可不? map.enableScrollWheelZoom();//启用地图滚轮攡Ǒ֤~小 map.enableDoubleClickZoom();//启用鼠标双击攑֤Q默认启?可不? map.enableKeyboard();//启用键盘Ȼ˿ֲ下左右键移动地? } //地图控gd函数Q? function addMapControl(){ //向w图中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); } //标注Ҏl? var markerArr = [{title:"深圳Dzǹ⎧҂e·毅荣川电子U技有限公司",content:"?nbsp;址Q深圛_宝安乡鹤州塼源工业城C9??,point:"113.869114|22.642643",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://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>