Google Streetview

Hello Everybody!

I started processing this year at the university and now I want to make an interaktive programm with processing, where you sit on a swing and with every move forward you go one frame forward in google maps streetview.
I already found something called “Unfolding” but still dont know how to use it exactly and also it seems, that this programm is just reading out data from Maps, not Streetview.
Anyone knows how to make this function?

Thankful for every advice!
Happy New Year everyone!


1 Like

Google has provided an API for this:

The process to get it working is neither simple or straight forward.

But that might be overkill for your project!

Really consider this: Do you actually need to pull real street view imagery, live from google when your sketch runs, of anywhere in the world?

Probably not.

If you only want to show one image after another, and only of a specific street, it is MUCH easier to just prepare all the images ahead of time. You could find & view the street view images you want in your browser and then take screenshots… and just load those images in your sketch.

1 Like

Thanks for the answer. Actually i thought of this, just making pictures of streets around the world, but then I would be limited to the pictures I take and I have to take a lot of pictures. Additionally, the move you make on the swing forward, fits perfectly to the move in Streetview.
By the way, I forgot to mention that the swing is connected to an selfmade interface, which can read out any angle and sends it to the computer.

But that link already is good help :slight_smile:

I need to add streetview to my processing program and i read the entire web page but it didn’t really say how to actually use it.

You’re kidding, right? The whole page is the description of how to use it.

You’ll need an API key, first of all. The “before you begin” section links to this page: Getting started with Google Maps Platform  |  Google Developers
…which has bright blue “Get Started” button on it! Hell, it’s even interactive!

Once you have an API key, you can make HTTP requests and pass the right parameters in the URL. In return, you’ll get an image of the given location.

You’ll probably want to make those calls with loadImage(), but there may be better options in pure JavaScript.

I understood how to “customise” the url which is what the article is mainly about, but not how I put it in processing

as TfGuy44 said:

You’ll probably want to make those calls with loadImage() , but there may be better options in pure JavaScript.

So, one flow is:

  1. define API key and signature
  2. build each API call string, with your key / signature included
  3. load the image from the call with loadImage()
  4. show the image
String GOOGLE_API_KEY = "";
String API_SIGNATURE = "";
String apicall = ",-122.4211769&fov=80&heading=70&pitch=0&key=" + GOOGLE_API_KEY + "&signature=" + API_SIGNATURE;
PImage img = loadImage(apicall);
image(img, 0, 0);

Don’t forget to review the details on the Street View docs:

…and remember that if you pass no credentials, bad credentials, OR ask for a view that doesn’t exist, you will get different errors, as they describe.