title: Google Street View container inside Shiny Application
body: <p>I have been trying to create a web application with an embedded Google Street View using RStudio's Shiny library; but have not been able to get the street view to render in the applicaiton.
  I've been using the example JavaScript and HTML from:
  <a href="https://developers.google.com/maps/documentation/javascript/examples/streetview-embed" rel="nofollow">https://developers.google.com/maps/documentation/javascript/examples/streetview-embed</a>
  which I paste here:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Street View containers&lt;/title&gt;
      &lt;style&gt;
        html, body, #map-canvas {
          height: 100%;
          margin: 0px;
          padding: 0px
        }
      &lt;/style&gt;
      &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;signed_in=true"&gt;&lt;/script&gt;
      &lt;script&gt;
  function initialize() {
    var bryantPark = new google.maps.LatLng(37.869260, -122.254811);
    var panoramaOptions = {
      position: bryantPark,
      pov: {
        heading: 165,
        pitch: 0
      },
      zoom: 1
    };
    var myPano = new google.maps.StreetViewPanorama(
        document.getElementById('map-canvas'),
        panoramaOptions);
    myPano.setVisible(true);
  }
  
  google.maps.event.addDomListener(window, 'load', initialize);
  
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="map-canvas"&gt;&lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My ui and server scripts are:</p>
  
  <p>ui.R</p>
  
  <pre><code>shinyUI(fluidPage(
    titlePanel("Google StreetView"),
    mainPanel(
      uiOutput("inc")
    )
  ))
  </code></pre>
  
  <p>and</p>
  
  <p>server.R</p>
  
  <pre><code>library(shiny)
  
  shinyServer(function(input, output) {
    getPage&lt;-function() {
      return(includeHTML("googleStreetViewContainer.html"))
    }
    output$inc&lt;-renderUI({getPage()})
  })
  </code></pre>
  
  <p>I've tried a few different versions of the ui.R and server.R files by using includeHTML directly in the ui.R file rather than defining the getPage function and also using tags$script in the ui.R file.</p>
  
  <p>I have not gotten any errors, but the Street View is not rendering. Any ideas?</p>