XML

Brainstorming a Custom Mapping Application

There are all kinds of interesting prospects out there when it comes to dreaming up your own custom Google Maps application. The sample application that you work through in the remainder of this lesson is based upon an application that I desperately needed to develop for a real-world project. I was hired to revamp the web site of a local construction company that wanted an interactive map of its projects, among other things. Although I could've certainly used image maps, JavaScript, and other traditional web trickery to put together somewhat of an interactive project map, it occurred to me that Google Maps might make an ideal environment for this task. So I ended up developing a custom Google Maps application that displays the builder's projects around town. I even took things a step further by using custom markers to provide visual cues as to whether a project is active (still has properties for sale) or completed (sold out).

In this example, the custom mapping application involved several facets:

  • Developing an XML language for coding real estate properties

  • Interacting with the Google Maps API to open and display a map centered on a certain location

  • Using the Google Maps API to create custom markers for each property

  • Using XSLT to present a unique information window for each property when it is clicked in Google Maps

The remainder of this tutorial focuses on a slightly pared down version of this application. However, before you get into the design and development of the application, you may want to try out the real thing online. Visit http://www.haurysmith.com/condomap.htm to see the real-world example application that I developed for the construction company. This web page is shown in Figure 15.5.

Figure 15.5. The Haury & Smith sample mapping application demonstrates how Google Maps can be used in a practical commercial context.

Again, you spend the rest of this lesson developing a Google Maps application very similar to the one shown in the figure. With this knowledge, you'll be ready to develop your own mapping applications with relatively little effort.

Real estate isn't the only custom Google Maps application I've tackled. I'm in the process of developing the world's first interactive skatepark map where you'll eventually be able to find the location of every skateboard (extreme sports) park in the world using Google Maps. Check out http://www.skateparkmap.com/ to find out more.