As I have stated in a previous blog post, the Google Maps API with the YM4R/GM plugin has provided us with great potential for our Cartabuzz project. However, Cartabuzz was recently and temporarily hindered by Google’s version control.
Earlier today, we continued work on some features for the next Cartabuzz rollout when, much to our surprise, the Google Map controls (zoom controls, scale bar, even the ‘powered by Google’ icon) were gone. Using Firebug we noticed that the div tags for the controls were being created properly, and the proper Javascript was executing correctly without errors, yet our controls were simply not appearing on the map. Even when we rolled back to a much earlier revision, our controls would not appear. Therefore, the issue must have been with Google Maps itself, as functionality that worked in a previous revision was suddenly broken.
It turns out that recently, Google released v2.133d, thus pushing v2.133d to v2.x and pushing v2.132d (the version we were using) to v2 (article explaining this can be found here). Apparantly, this latest update to Google Maps API caused an incompatibility somewhere in our application. Therefore, we modified the YM4R/GM plugin code in our project to use v2.132d instead of v2.x, and now Cartabuzz is functioning properly again.
To those of you who are using YM4R/GM in your Rails projects and cannot find where the Google Maps API version is specified, look in vendor/plugins/ym4r_gm/lib/gm_plugin/map.rb. Within the self.header method definition, find the line similar to the following(should be line 34):a = "<script src=\"http://maps.google.com/maps?file=api&v=2.x&key=#{api_key}&...</script>\n" |
Leave a Comment