Hans
Hans

Reputation: 11

What is wrong with my KML, generated with PHP

I generate a KML file with PHP. It does not show in Google Maps and in Google Earth version 6.

I can't find what is wrong with it. There are no error messages given by Google Maps and Google Earth.

Here is the link to the PHP file:

edit: (had the google-maps link instead of a link to my php file)

http://test.happymonster.nl/kml/hierzijnwijgeweest.php

Upvotes: 1

Views: 530

Answers (1)

CodeMonkey
CodeMonkey

Reputation: 23738

The KML generated via PHP is not valid and the unknown elements are being ignored by Google Earth/Maps.

KML is case-sensitive and your KML is using "document" rather than "Document" so all your Folders, and Placemarks are ignored.

This is one case where if you enable Error checking in Google Earth it would catch it. Under Tools/Options/General select "Show prompts for all errors" in the KML Error handling section. Now when you load your KML it will prompt an error that "document" is unknown element.

In addition to the basic Error handling in Google Earth you can validate your KML using the Galados KML Validator.

Upvotes: 1

Related Questions