lat: 43.665429,
lng: -79.403323,
zoom: "10"
+ } )
+ .googlemap({
+ start: 0, // seconds
+ end: 20, // seconds
+ type: 'STREETVIEW',
+ target: 'map1',
+ lat: 43.665429,
+ lng: -79.403323,
+ zoom: "1",
+ heading: 0,
+ pitch: 0
} )
.googlemap({
start: 0, // seconds
<body>
<h1 id="qunit-header">Popcorn google Map Plug-in Demo</h1>
<p> A Google Map displaying Toronto, Ontario will appear at 0 seconds and disappear at 20 seconds.</p>
+ <p> A Google StreetView Map displaying Toronto, Ontario will appear at 0 seconds and disappear at 20 seconds.</p>
<p> A Google Map displaying Boston will appear at 0 seconds and disappear at 30 seconds.</p>
<div>
<video id='video'
</video>
</div>
- <div style="width:700px">
+ <div style="width:1000px">
<div id="map" style="position:relative;float:left;width:300px;height:400px"><p>Locations in this video:</p></div>
+ <div id="map1" style="position:relative;float:left;width:300px;height:400px"><p>Locations in this video:</p></div>
<div id="map2" style="position:relative;float:left;width:300px;height:400px"><p>Locations in this video:</p></div>
</div>
</body>
* -Start is the time that you want this plug-in to execute
* -End is the time that you want this plug-in to stop executing
* -Target is the id of the DOM element that you want the map to appear in. This element must be in the DOM
- * -Type [optional] either: HYBRID (default), ROADMAP, SATELLITE, TERRAIN
+ * -Type [optional] either: HYBRID (default), ROADMAP, SATELLITE, TERRAIN, STREETVIEW
* -Zoom [optional] defaults to 0
+ * -Heading [optional] STREETVIEW orientation of camera in degrees relative to true north (0 north, 90 true east, ect)
+ * -Pitch [optional] STREETVIEW vertical orientation of the camera (between 1 and 3 is recommended)
* -Lat and Lng: the coordinates of the map must be present if location is not specified.
* -Location: the adress you want the map to display, bust be present if lat and log are not specified.
* Note: using location requires extra loading time, also not specifying both lat/lng and location will
start : {elem:'input', type:'text', label:'In'},
end : {elem:'input', type:'text', label:'Out'},
target : 'map-container',
- type : {elem:'select', options:['ROADMAP','SATELLITE', 'HYBRID', 'TERRAIN'], label:'Type'},
+ type : {elem:'select', options:['ROADMAP','SATELLITE', 'STREETVIEW', 'HYBRID', 'TERRAIN'], label:'Type'},
zoom : {elem:'input', type:'text', label:'Zoom'},
lat : {elem:'input', type:'text', label:'Lat'},
- lng : {elem:'input', type:'text', label:'Lng'},
- location : {elem:'input', type:'text', label:'Location'}
+ lng : {elem:'input', type:'text', label:'Lng'},
+ location : {elem:'input', type:'text', label:'Location'},
+ heading : {elem:'input', type:'text', label:'Heading'},
+ pitch : {elem:'input', type:'text', label:'Pitch'}
}
},
_setup : function( options ) {
options._map.setZoom( options.zoom );
google.maps.event.trigger(options._map, 'resize');
+
+ if(options.type === 'STREETVIEW'){
+ var streetViewOptions = {
+ position: options._location,
+ pov: {
+ heading: options.heading,
+ pitch: options.pitch,
+ zoom: options.zoom
+ }
+ };
+ var streetView = new google.maps.StreetViewPanorama(options._newdiv, streetViewOptions);
+ }
+ options._map.setStreetView(streetView);
}
};