Hywel said:
The front-end code to Google Maps is trivial. It's the back-end stuff that's smart.
Sure, but the front-end should be as nice as the back. I like pretty +
idiot girls, but for sure I preffer a pretty and smart one
I suspect that the code you've seen has been mashed before deployment.
I don't know if it's just because of that, I took a look on the adsense
code and it looks bad too, too many global stuffs, the "google.com/ig
API" also looks bad, etc.
So, going on your first answer, how does Google Maps attach new images
to the scrolling edges of the display? It doesn't load tiles for the
entire world in one go - it adds them as required.
For sure not, that's an impossible solution hehe.
In my mind, there must be some not visible blocks around the "drag box"
and when you scroll by 1 block, the src of the <img>'s get changed and
the blocks are adjusted in the center again, at least I would do it this
way, but there are quite a lot of ways to achieve this objective.
+-------+
| +---+ |
| |###| |
| +---+ |
+-------+
This is just an example of what I would do, since adding new blocks as
the user scrolls would require quite a lot of memory.