We’ve all used MapQuest or Yahoo Maps. You type in an address, wait for the page to reload, click a "North" button, wait for the page to reload again... it's a clunky, frustrating experience. But Google just released Google Maps, and it has made every other mapping service look like a relic of the 90s.
The "Slippy Map"
The secret is what people are starting to call a "Slippy Map." Instead of loading a single giant image, Google Maps breaks the world into thousands of small 256x256 pixel "tiles." As you drag the map, the browser uses JavaScript (AJAX) to fetch only the new tiles needed.
It feels fluid. It feels like a desktop application. This is the "Aha!" moment for AJAX that we’ve been waiting for.
Technical Detail: Tiling
The tile system is ingenious. They use a Mercator projection and create a pyramid of tiles for different zoom levels.
// Conceptual tile calculation
function getTileURL(x, y, zoom) {
return "http://mt0.google.com/vt/x=" + x + "&y=" + y + "&z=" + zoom;
}
By pre-rendering these tiles on their massive server farm, Google has made the front-end incredibly responsive.
Outlook
Google Maps isn't just a map; it's a platform. I expect we'll see people "hacking" the API (which hasn't even been officially released yet!) to put their own data on top of Google's maps. This is the beginning of the "Geo-Web." If you're a web developer and you're not learning how to use XMLHttpRequest today, you're already falling behind.
Aunimeda develops websites and web applications for businesses - corporate sites, e-commerce, portals, and custom platforms.
Contact us to discuss your web project. See also: Web Development, E-commerce Development