Archive Page 5



UPDATE: A savvy reader Carl Olsen pointed out that it wasn’t actually necessary to check for the infoWindow state and the problem could simply be fixed by a check for an overlay. The post has been updated accordingly. Thanks Carl.

It seems that somewhere along the line something changed with the event handling and the Chapter 3 code wasn’t quite working right.
The problem listing is 3-4 where we defined the click event for the map. When you clicked inside the info window and associated form elements, or on a new marker, the click event for the map fired as well as the click event for the info window and overlays. According to the Google Maps API this is the desired effect, so the listing has been updated to include an if statement that ensures the click wasn’t on an overlay, and the info window isn’t already open:

if(!overlay) {

// run the code

}

This seems to have cleared up most of the issues with the only caveat being that you’ll have to manually close the infoWindow first to position it in a new location.

Thanks to those who pointed out the bug.

It’s been an active few weeks for the Google Maps API team. They’ve announced a number of interesting new additions, and the community has discovered a few more. We can’t possibly hope to cover everything in great detail, but we do hope to work these changes into any future revisions of our book. Until then, here is a summary of what we’ve learned in the last little while. Continue reading ‘New Aspects of the Google Maps API’

Beginning Google Maps with What?

Over the past two months—since Beginning Google Maps Applications hit shelves—we’ve had a handful of basic questions about PHP, CSS and SQL. I just want to clear up a few misconceptions that people may have about the content of our book so that everyone can get the most out of reading it. Continue reading ‘Beginning Google Maps with What?’

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… Continue reading ‘What are apikey.php and db_credentials.php?’

The Chapter 10 Figures

This is just a quick note for readers who’ve reported problems with the figures in Chapter 10. Due to an issue with the printing process in the first run of Beginning Google Maps Applications, they were much lighter than they should have been, to the point of being almost unreadable.

We’ve made the relevant images available here.