Php 如何在指向办公地点的网站中嵌入Bing地图?

Php 如何在指向办公地点的网站中嵌入Bing地图?,php,javascript,maps,Php,Javascript,Maps,如何在我的网站中嵌入Bing地图,并通过描述性信息窗口指向我的办公地址?以下是一个示例: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Infobox set location</titl

如何在我的网站中嵌入Bing地图,并通过描述性信息窗口指向我的办公地址?

以下是一个示例:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title>Infobox set location</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
      <script type="text/javascript">
      var map = null;

      function getMap()
      {
        map = new Microsoft.Maps.Map(document.getElementById('myMap'), {credentials: 'Your Bing Maps Key'});
      }

      function setInfoBoxLocation()
      {
        map.entities.clear();         
        var infoboxOptions = {width :200, height :100, showCloseButton: true, zIndex: 0, offset:new Microsoft.Maps.Point(10,0), showPointer: true, title:'Infobox Title', description:'Infobox description' }; 
        var defaultInfobox = new Microsoft.Maps.Infobox(map.getCenter(), infoboxOptions );    
        map.entities.push(defaultInfobox); 
        defaultInfobox.setLocation(new Microsoft.Maps.Location(47.4, -122.33));
      }
      </script>
   </head>
   <body onload="getMap();">
      <div id='myMap' style="position:relative; width:400px; height:400px;"></div>
      <div>
         <input type="button" value="SetInfoBoxLocation" onclick="setInfoBoxLocation();" />
      </div>
   </body>
</html>

信息盒集位置
var-map=null;
函数getMap()
{
map=new Microsoft.Maps.map(document.getElementById('myMap'),{credentials:'Your Bing Maps Key'});
}
函数setInfoBoxLocation()
{
map.entities.clear();
var infoboxOptions={宽度:200,高度:100,showCloseButton:true,zIndex:0,偏移量:new Microsoft.Maps.Point(10,0),showPointer:true,标题:'Infobox title',描述:'Infobox description'};
var defaultInfobox=new Microsoft.Maps.Infobox(map.getCenter(),infoboxOptions);
map.entities.push(defaultInfobox);
setLocation(新的Microsoft.Maps.Location(47.4,-122.33));
}
以下是更多的例子: