Roll Your Own Slippy Map

Jesse James Garrett coined the acronym AJAX in 2005, just a few weeks after Google Maps was initially released. His article Ajax: A New Approach to Web Applications is a great example of the sweeping advancements that were happening in web development at the time. This era -- roughly a decade after Tim Berners-Lee published the very first web page in 1991 -- represents such an exciting break from the past that we call it Web 2.0.

Google Maps -- both then and now -- demonstrates the power of standards-based, browser-native, framework-free web development. It also demonstrates how using HTML, CSS, and JavaScript together is an essential skill for modern web developers.

In this "View/Source"-driven, self-guided tour of building your own Slippy Map, you'll take 10 easy steps from an initial static image to a fully interactive map. Along the way, you'll use semantic HTML elements to build the structure of the web app, CSS for layout and styling, and roughly 150 lines of JavaScript to manage the behavior of the web app.

You can follow along with the live demo in your browser, or you can download the source code and run the website locally. Either way, be sure to view the source so that you can read the comments and see the changes on a step-by-step basis.

This example is intentionally simple enough that you shouldn't be afraid to hand-write the code yourself as you follow along!

Resources