I have finally cracked the problems I was having with rewriting gTraffic code for the v2.0 of the Google maps API. I was getting a null value back as a the xml document when a layer of the road data was requested. I could not figure out what was wrong as it only did it if you selected a ‘region’ from the panel, the map was fine. Well, I am still not sure what is the cause but it seems that any ‘GXmlHttp’ object you create has to have global scope. As soon as I made the request object global the problem went away. This has been bugging me for about two weeks and was putting me off from working on the site so hurray!
So whats changed? A few things..
– the new API calls are use instead.
– ditched GxMarker class as it wasn’t compatible with the v2.0 maps.
– redesigned the xml format for the layers. The new format is much tidier and has lost the flabby extraneous stuff which wasn’t needed.
On the down side there are a few things about the new version of the maps I don’t like:
– really slow compared to v1.o.
– they flipped the zoom level meaning which was thoroughly annoying.
– the infowindows don’t clear when you click elsewhere on the map. This is frustrating as you have to pull the whole infowindow into view to close it from the x icon.
They added support for tooltips but they are a bit crap so I have used a different approach. The new tooltips are not transparent anymore which was always something that was a bit of accident rather than design.
So, how long will it take me to finish? Let me get back to you on that one.
I really wanted to keep the anonymous comments switched on but I can’t be bothered wading through all the spam. If you want to comment you will now have to sign in or better just email me.
I am still working on conversion of gTraffic site to v2 of Google maps API. It is mostly down except for an annoying bug (I will spare you the details) which I cannot seem to track down.