I don't know... I clicked a few times... the first time was a beautiful, picturesque spot in the Lake District in England. Every stop after that was some kind of inter-state or major road in the US, with basically nothing around but trees and a road. It got boring pretty quickly.
This would have been much more interesting if they'd allowed people to vote places that they were parachuted in up or down, and then displayed the distribution of interesting places around the world.
Also would have been nice if the "search" wasn't so slow.
It's weird... the first five scenes I saw were fantastic, exotic, sharp images, and I was so inspired I sent the link to several of my family and friends. Now, I'm clicking through, and I can't find any more good ones.
Indeed... first it showed me some rural area in Scotland, then some beautiful suburban place in Denmark, then somewhere equally beautiful in Holland - I'm amazed at those countries.
Agreed. They're already using squirrels for reproduction / child rearing / getting them young 'uns out of the house. And once you control the squirrels, you're not far from controlling everything....
How rural it is, by area (or by street distance) sure, but by population the world is now > 50% urban. (And the “more developed regions” are 75% urban by population.)
Looks like they're randomly dropping the viewer until they get a hit (I've gone over "searching (600)"). I wonder if there's a faster way to do that with their API?
Completely random drop would fare really bad (street view is very rare compared to Earth's surface).
What I would do is a sort of "computer vision". Map has well defined colors for features, so you just need to check pixels with proper shading.
This should be quite easy as street view availability seems like a transparent overlay image, so you even wouldn't need to distinguish it from other map features.
And even if it's composited with the map image server-side, it should be still quite easy to extract it, just look for pixel diff compared to normal map image.
In the time it took to act smart you could have just read the code and seen that his intuition was mostly right. The code is extremely simple. It reads like a half day project just for fun that happened to get picked up on HN. It doesn't seem to be at all related to his line of study either.
For you interest and information, he has a defined set of bounding boxes in the world for each of the user pickable regions. He generates random lat lons until one lands in an enabled region's bounding box and then makes a request for street view data to google. If google returns a 200 he sets the street view display to the lat Lon and otherwise tries to find another lat Lon. If he ever gets a 500 from
Google he quits.
I wasn't trying to figure out how it was done, I was trying to figure out how to do it fast (irrespective of the present implementation), responding to the question:
"I wonder if there's a faster way to do that with their API?"
I did check the source code. The most time is spent doing dozens to hundreds requests to Google API.
If instead of this you generated random locations just from "blue" regions of StreetView coverage, user experience would be better.
The simplest way how to do it would be to fetch StreetView coverage overlay PNG and use canvas getImageData to check pixel values for random locations, thus moving costly roundtrip validity query mostly to the browser.
This is not something terribly difficult and perfectly suitable for half day fun project.
There are ways how to get around cross-domain security restrictions. Long ago, I have done it myself by a simple server-side proxy here (few lines of PHP):
About Globe Genie optimization. In fact, I implemented it, sent a patch to the author and it's already live there (check the source code). It cuts cross-network locations validity lookups by about 60%.
Here I didn't do proxy, just fetched a complete set of overlay tiles once and stitched them together with a Python script:
It's just a static prebaked lookup map (served from the same domain), though if you really want to have it up-to-date, you could hook up Python script to cron.
All this took few hours (Sunday evening hacking) and was quite fun to do.
I'd assume it only attempts drops on streets. In which case, as badly as one in a few hundred drops on only streets? I bet it'd be pretty close. They've street-viewed an absolutely ridiculous amount of roads.
It seems like it would be fairly easy to build up a cache of found places, and then queue up new ones across different users.
But still it's amazing, looking around the world randomly. It would be nice if there was a better virtual driving tool, or more zooms (aerial views). At the moment you can only double click repeatedly and you go about the same speed as a car.
This. Every new user should get a cached random location and immediately start calculating another drop in the background to upload to the servers cache.
While I wait for the page to reload I pretend I'm being teleported randomly from place to place. I spend a few moments figuring out how I would survive in this new environment or move down the street to see what is around the next corner before I'm moved again.
Try normal Google Maps, zoom out to see the whole world. Drag yellow StreetView dude, you will see blue overlay showing StreetView coverage (ignore isolated dots, these are Panoramio photos).
You will see that South Africa is the only place in Africa with coverage.
Ah... I have to admit, it made me smile. It randomly brought me to Italy and to an area I knew pretty well (Torino/Milano). I have family over there :)
I lack the skills to write it but it would be great if I could enter the addresses of two US locations and a website took me for a virtual drive along the route by using Google Maps + Street View
Dunno about that but I am just hoping to either re-live a memory or, waste some random time virtually driving between cities I may not be able to visit anytime soon.
I love it, but why does it take so much time for 'searching' ? Is it generating random coordinates and then tries to match them with street view coverage ?
It's interesting because the world is so large. It's interesting because you never know what you're going to see. It's interesting because most people wouldn't even dream this was possible just a few years ago.