title: Google Street View in a TWebBrowser
body: <p>Has anyone had any success getting StreetView to display in a TWebBrowser control?</p>
  
  <p>I want to build a Url programmatically and have it display in a simple Delphi form.</p>
  
  <p>Here's what I have so far for that form:</p>
  
  <pre><code>unit frmSView;
  
  interface
  
  uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, OleCtrls, SHDocVw, StdCtrls;
  
  type
    TfrmStreetView = class(TForm)
      browserStreetView: TWebBrowser;
      txtAddress: TEdit;
      procedure txtAddressExit(Sender: TObject);
      procedure ShowSV(Lat: string; Lon: string);
    private
      // private declarations
    public
      // public declarations
    end;
  
  var
    frmStreetView: TfrmStreetView;
  
  implementation
  
  {$R *.dfm}
  
  procedure TfrmStreetView.ShowSV(Lat: string; Lon: string);
  var
    Addr: string;
    Flags: OleVariant;
  begin
    Addr := 'http://maps.google.com/maps?q=&amp;&amp;layer=c&amp;&amp;cbll=' + Lat + ',' + Lon + '&amp;&amp;cbp=12,0,0,0,0&amp;&amp;output=svembed';
    browserStreetView.Navigate(Addr, Flags, Flags, Flags, Flags);
    txtAddress.Text := Addr;
    ShowModal;
  end;
  
  procedure TfrmStreetView.txtAddressExit(Sender: TObject);
  var
    Flags: OleVariant;
  begin
    browserStreetView.Navigate(txtAddress.Text, Flags, Flags, Flags, Flags);
  end;
  
  end.
  </code></pre>
  
  <p>When the form shows:</p>
  
  <ul>
  <li>if there is no street view information at that location, I get a regular map view.</li>
  <li>If there is street view information (verified in another browser window), it just displays a grey screen.</li>
  </ul>
  
  <p>I'm guessing that the Flash player is not loading.</p>
  
  <p>Do you guys have any ideas?</p>
  
  <p>Regards,</p>
  
  <p>Simon</p>