Getting the POV for Google StreetView API

前端 未结 6 1014
抹茶落季
抹茶落季 2020-12-04 21:26

I am currently using the Google Street View Panorama embed and I want to get the POV (more specifically heading) for a particular address.

Google does this via maps.

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 22:21

    Can't tell if you want to get or set the POV

    to set follow the instructions here: http://code.google.com/apis/maps/documentation/javascript/services.html#StreetViewPanoramas

    var panoramaOptions = {
      position: fenway,
      pov: {
        heading: 34,
        pitch: 10,
        zoom: 1
      }
    };
    

    to get:

    alert( panoramaOptions.pov.heading );
    

提交回复
热议问题