1. Home >
  2. Documentation >
  3. Street View >
  4. streetviewpanorama
 

streetviewpanorama

This function allows to add a google.maps.StreetViewPanorama into a div.

Usage

Parameters

  • divId {string} Id of the targetted div (optional)
  • options {object}

Example

In this example, the container div is dynamically created and used as a jQuery node.

var fenway = new google.maps.LatLng(42.345573,-71.098326);
$("#test").gmap3({
  map:{
    options:{
      zoom: 14, 
      mapTypeId: google.maps.MapTypeId.ROADMAP, 
      streetViewControl: true, 
      center: fenway 
    }
  },	
  streetviewpanorama:{
    options:{
      container: $(document.createElement("div")).addClass("googlemap").insertAfter($("#test")),
      opts:{
        position: fenway,
        pov: {
          heading: 34,
          pitch: 10,
          zoom: 1
        }
      }
    }
  }
});

Close