开发者

Is there a simple way to add street view to my Google Maps?

Basically I just want to add street view to my existing maps, changing the side bar from this:

http://sn开发者_开发技巧pr.cm/BdJy9z.png

To this:

http://snpr.cm/4Wz4EZ.png

Is there a simple way to do this?


There's a lot of documentation for the google map api. You should read it.

http://code.google.com/apis/maps/documentation/javascript/services.html#StreetView

Here's an example:

var panoramaOptions = {
  position: new google.maps.LatLng(42.345573,-71.098326);,
  pov: {
    heading: 34,
    pitch: 10,
    zoom: 1
  }
};
var panorama = new  google.maps.StreetViewPanorama(document.getElementById("pano"),panoramaOptions);
map.setStreetView(panorama);


The issue was I was still on Google Maps API v2, with v3 street view is there automatically.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜