JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://maps.google.com/maps/api/js?sensor=false&.js"></script>
<button id="show-pano">Show</button>
<div id="pano">
</div>
CSS
#pano {
display:none;
height:400px;
width:400px;
}
JavaScript
$(function() {
var fenway = new google.maps.LatLng(42.345573,-71.098326);
var panoramaOptions = {
position: fenway,
pov: {
heading: 34,
pitch: 10,
zoom: 1
},
visible:true,
};
var panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"), panoramaOptions);
//map.setStreetView(panorama);
$('button').click(function() {
$('#pano').show();
});
});