|
|
|
|
|
by bd
5770 days ago
|
|
I don't understand your comment. 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. |
|
It's not something terribly difficult — it's something that is completely impossible for a very good reason.