WebKit: Google StreetView

January 17, 2009 Matteo Bertozzi | Filed Under Cocoa | 2 Comments

Last iPhoto ‘09 presented at MacWorld contains a couple of interesting Features: Faces and Places. Today, I’ve a little bit of free time to play with my Mac, and the topic is How to embed Google StreetView into a Cocoa Application.
Cocoa Streetview Cuppertino
The Solution is using WebKit and Google Maps API. We’ve a simple HTML file that contains StreetView “Canvas” and a couple of javascript methods that interact with GStreetviewPanorama Object.
Cocoa Streetview San Francisco
The Source Code is Available Here: Cocoa StreetView Source.

2 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Looks great ! I was frustrated by the small window and modified it to handle resize :

    * add html, body { height: 100% } to the CSS
    * change street view DIV to
    * add body onresize handler calling streetView.checkResize()
    * finally, add the resize springs in Interface Builder

    Voilà ! Type “Lyon, France” to visit my hometown :)

    Comment by Patrick Geiller — January 17, 2009 #

  2. The street view DIV got mangled  — change its style to “width: 100%; height: 100%”.

    Comment by Patrick Geiller — January 17, 2009 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>