JSFiddle - React, Tailwind, and code Playground

HTML

<DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <title>Street View service</title>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    <script>
        var panorama;

        function initialize() {
            var fenway = new google.maps.LatLng(42.345573,-71.098326);
            var panoramaOptions = {
                position: fenway,
                pov: {
                heading: 4,
                    pitch: 10
                }
            };
            panorama = new  google.maps.StreetViewPanorama(document.getElementById('pano'),panoramaOptions);
    
            var move = true;
        
            $("#pano").on("mouseenter", function () {
                move = false;
            });
        
            $("#pano").on("mouseleave", function () {
                move = true;
            });
        
            var i = 0;
            window.setInterval(function () {
                panorama.setPov({
                    heading: i,
                    pitch: 10,
                    zoom: 1
                });
                if (move) {
                    i += 0.1;
                }
            }, 10);
        }

        google.maps.event.addDomListener(window, 'load', initialize);

    </script>
  </head>
  <body>
    <div id="map-canvas" style="width: 400px; height: 300px"></div>
    <div id="pano" style="position:absolute; left:410px; top: 8px; width: 400px; height: 300px;"></div>
  </body>
</html>