开发者

Bing Maps streetview

开发者 https://www.devze.com 2023-02-23 14:45 出处:网络
I\'m using Bing Maps 7.0 Ajax Control API and am wondering how to display streetview. There doesn\'t seem to be a way, b开发者_如何学Cut this can\'t be the case. Is there a way?

I'm using Bing Maps 7.0 Ajax Control API and am wondering how to display streetview. There doesn't seem to be a way, b开发者_如何学Cut this can't be the case. Is there a way?

Thanks, Chris


Microsoft Street*side* (Streetview is Google's brand) is available via the Bing Maps website (www.bing.com/maps/explore), or using the Bing Maps Extended Modes dll in a Silverlight application only.

It is not currently available in the AJAX v7.0 control.

See here for information on how to add streetside view to a Bing Maps Silverlight application: http://www.bing.com/community/site_blogs/b/maps/archive/2009/12/10/adding-streetside-and-enhanced-birds-eye-to-your-applications.aspx


HTML Streetside for Bing Maps is now possible: http://bertmolinari.com/2011/05/09/html-streetside-for-bing-maps/


As of version 8 you can initialize the Bing Map to use Streetside mode. Below is a code sample.

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>

The Bing Map Control SDK has additional code samples for getting started.

0

精彩评论

暂无评论...
验证码 换一张
取 消