Monday, October 20, 2008

Gotcha Of The Day - Google Maps app stops working

This one is just plain whacky. All of a sudden, a Google Maps app I've been working on stops working. It would no longer allow me to add controls to the map, and the call to open an info window would result in nothing being shown.

After much debugging, I finally narrowed it down to the fact that Google Maps and Prototype were conflicting.

My hypothesis for what's going on is that I'm importing the latest version of Google Maps by saying:

 google.load("maps", "2.x");
 google.setOnLoadCallback(load);

Perhaps Google made a slight modification to their API and now it conflicts with Prototype? That seems a bit much, as I can't find any announcement anywhere from Google that they've updated the API.

Googling around, I found this guy had a similar problem to what I had going on. But, he had his issue back in June.

Still, his solution worked - he suggests explictly pulling back a past version of Google Maps. So for me, doing:

 google.load("maps", "2.115");
 google.setOnLoadCallback(load);

"fixed" things.

I don't love this solution, but at least the application is back to working again. Anyone who has any insight into this, I'd love it if you shared. Thanks.

No comments:

Post a Comment