Thursday 2 September 2010

Google Mapping

Yesterday evening I was looking at my website error logs, and I noticed they were all empty since about March.

So this morning I tried to find out why. I think the problem was that previously I had my error logs using the debug level. Then in March, I removed the debug level for the error logs from the different website configs, which meant that the error log level defaulted to crit. So because there weren't any critical errors, this meant the error logs were blank.

I would rather be advised of all errors than just critical ones, so I changed the error log level to warn.

After that I checked the Google Maps API forum to see if I'd had any replies to my question about the map tiles not being loaded in Firefox. I hadn't had any replies, and judging by the large number of threads there with no replies, it looked like I was unlikely to get a reply.

So I tried to debug the problem a bit further myself. I found that it worked when the page was served as text/html but not when served as application/html+xml. I found this XHTML document.write implementation, which didn't make any difference - the tiles still wouldn't load. Next I tried John Resig's implementation of XHTML compatible doument.write, but that didn't make any difference either.

So I gave up trying to get google maps working in an XHTML page, and instead put the google map in an HTML page. Then I made an object in my XHTML page that included the HTML google map page. I had read that using object as a substitute for an iframe in XHTML pages doesn't work properly in IE, so I was very surprised when it did work. I was also surprised to see that it worked in Konqueror too.

I tested:
  • IE6 on XP
  • IE7 on XP
  • IE8 on Win7
  • Opera 10.6 on Win7
  • Safari 5 on Win7
  • Chrome 5 on Win7
  • Arora 0.10.0 on Win7
  • K-Meleon 1.5.4 on Win7
  • Firefox 3.6.8 on Win7
  • Conkeror (not sure what version) on Ubuntu 10.04 LTS
  • Konqueror 4.4.2 on Ubuntu 10.04 LTS
  • Firefox 3.6.8 on Ubuntu 10.04 LTS
And amazingly it seemed to work okay in all of them. Surely something can't work cross browser without considerable hacking... CAN IT?!?!

I suspect that problems might arise if trying to communicate between the parent page and the page embedded as an object.

The rest of the day I was mainly working on my google map, which I did make a bit of progress on, so that was nice.

I also watched an episode of Super Sentai Jetman with L, and an episode of Power Rangers with L. I did some gardening, cutting down all the seeding Willowherb near the compost bin, and topped up the pond.

I made a carrot cake with L and watched an internet marketing webinar in the evening.

No comments: