Posts tagged ‘kml’

First disappointment with Google maps…

Just found the first thing that I’m a little disappointed with regarding Google Maps… I was trying to get my map to load it’s points from a KML file – for which there is very simple code to achieve (couple of lines) – and all worked fine when I was pointing to mykml.xml. But as soon as I change this to be mykml.php (because the kml is dynamically generated as the points are regularly changing – and even at the same point in time may be different for different users), the points fail to appear on my map. As it works for .xml and .txt extensions I can only assume that Google have blocked kml files that are obviously (given the file extension) dynamically generated.

I’m unsure as to why they would have placed this restriction (perhaps for performance reasons?) – so any info on this welcome – or if I’m doing something wrong?

I think I may have found a work around (this comment in particular), but I’ve not tried it out yet to see if it works, but will give it a go now…

Update (17/08/07): For info that particular work around didn’t work for me – I found lots of other links to work arounds, but unfortunately they all rely on changing the web server so KML files are processed in the same way as ‘normal’ PHP files. Unfortunately, this isn’t really an option for me, as it’s part of a new Moodle block which people would download and run on their own server and I’d like people to be able to the install and run it without having to fiddle with their web server. Guess it’s back to JSON requests to grab the markers…