Program Google Street View with Forth

wForth’ is a JavaScript based Forth interpreter. It has been extended here with a specialized dictionary to allow programmers to write Forth programs to script interactions with Google Street View. Programmers can perform 360 pans of their favorite location or automate a stroll through their favorite neighborhood; plus more.

Forth Console:
Geocode Lookup:
Address = Lat: Lng:

The Forth to Google Street View dictionary.

pace (n --) The number of milliseconds to pause between the execution of each Forth word. Allows time for the Flash viewer to make changes to the view.
latlng (n1 n2 n3 n4 --) Sets and displays the view at the given latitude and longitude. Those values are set as follows:
n1= degrees for latitude
n2 = decimal portion for latitude*
n3 = degrees for longitude
n4 = decimal portion for longitude*

* Decimal precision is 6 digits. Numbers with less than 6 will have 0s padded at the beginning to make them 6 digits. For example, 3 will be interpreted as .000003. If you require .3 enter the value in as .300000.

Usage Example: The Golden Gate Bridge has a lat/lng of 37.818774, -122.478415.

It would be entered as:
37 818774 -122 478415 latlng

Note: If a street view cannot be found for a given lat/lng the image will stay as is.
yaw (n --) Rotates the view around the horizontal axis. Like a compass. 0 is North, 90 is East, 180 for South and 270 for West.
pitch (n --) Rotates the view around the vertical axis. 90 is straight up and -90 is straight down.
+zoom (n --) Zooms the view in by the specified value.
-zoom (n --) Zooms the view out by the specified value.
next (-- --) Moves from the current panorama to the next using the position of yaw to determine which direction to proceed.

Additional Info:
For more info and Forth words(keywords) check out this online tutorial.

Example program that performs a 360 pan of Times Square:

100 pace 40 757584 -73 985642 latlng 360 0 do i yaw 5 +loop
  © 2008