2011-04-12 127 views
3

我使用Bing Maps 7.0 Ajax Control API,並且想知道如何顯示街景。似乎沒有辦法,但事實並非如此。有沒有辦法?Bing地圖streetview

謝謝, 克里斯

回答

0

截至8版本,你可以初始化兵要使用Streetside模式的地圖。以下是一個代碼示例。

HTML

<div id="bing-map"></div> 

<script type='text/javascript' 
src='http://www.bing.com/api/maps/mapcontrol?branch=release&callBack=initialize'> 
</script> 

<script> 
    function initialize() { 
     var startingPosition = new Microsoft.Maps.Location(40.263964, -76.8849); 
     var map = new Microsoft.Maps.Map(document.getElementById('bing-map'), { 
      credentials: 'Your Key', 
      mapTypeId: Microsoft.Maps.MapTypeId.streetside,     
      center: startingPosition 
     }); 
    } 
</script> 

Bing Map Control SDK有入門額外的代碼樣本。