Archive for the 'Code' Category



We’ve had a few questions about the purpose of apikey.php and db_credentials.php in the online source code. In most instances where the online listings don’t match those presented in the book the inclusion of these two files are the only signicant difference. So here’s a quick explanation…

One thing every Maps developer notices eventually, is that the API’s imagery doesn’t exactly match that which is on Google Maps itself.
Check out the two maps of uptown Waterloo, below. The image on the left is a shot of the API, while the one on the right is from Google Maps. Not only is the […]

A Better Loading Message

In Chapter 6 of the book, we showed you one way of creating a loading message for your users. The method demonstrated followed this basic pattern:

Serve the user an HTML page with the loading message in it,
Have an onLoad event call the Maps API’s initialization, and add all the markers to the map, and then
Remove […]

Shapefile Tiles with PHP and GD

Last week, I demonstrated some tools for importing Shapefile data into an SQL database. It’s time to put that stuff to work.
If you’re in a rush, here’s the final demo: translucent state overlays on a Google Map. It’s not the quickest thing in the world, nor is it entirely quirk-free; it exists as an initial […]

Parks KML Explained

Yesterday, I demonstrated a KML file of Ontario Parks. Although this approach has some fairly serious limitations over a full mashup, the portability and ease of deployment make it an excellent choice in some situations.
In this article, I explain how the techniques used to generate the Ontario Parks KML. These are general-purpose tools that could […]