kml file not working, error message does not make any sense.

40 views
Skip to first unread message

Eyal Saiet

unread,
Apr 17, 2013, 10:00:03 PM4/17/13
to kml-support-g...@googlegroups.com
Hello,
I made a kml file to mimic this an example from "

High Performance KML for Maps and Earth'-on youtube-link (at 15:11-16:05 or just 15:51)

This is for a presentation on Friday, so I am on a rush to get it to work, thanks.

I get the error: Validation stopped at line 2, column 45: no decleration found for element 'kml'

When I try to run this code GOOGL EARTH crashes.

Here is my code:

<?xml  version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<gx:Track>
    <when>13:51</when>
   <gx:coord>-147.871 64.861</gx:coord>
    <ExtendedData>
        <SchemaData  schemaUrl="#schema">
           <gx:SimpleArrayData  name="PM 2.5">
                <gx:value>0.0</gx:value>
                <gx:value>-6.0511e+15</gx:value>
                <gx:value>180</gx:value>
            </gx:SimpleArrayData>
        </SchemaData>
    </ExtendedData>
 </gx:Track>
</Placemark>
<Placemark>
<gx:Track>
    <when>13:56</when>
   <gx:coord>-147.871 64.861</gx:coord>
    <ExtendedData>
        <SchemaData  schemaUrl="#schema">
           <gx:SimpleArrayData  name="PM 2.5">
                <gx:value>0.0</gx:value>
                <gx:value>-1.0001e+16</gx:value>
                <gx:value>180</gx:value>
            </gx:SimpleArrayData>
        </SchemaData>
    </ExtendedData>
 </gx:Track>
</Placemark>
</kml>

compile_2_20__hr_pm2.kml
compile_2_20__hr_pm25.kml

Jason M

unread,
Apr 18, 2013, 8:19:33 PM4/18/13
to kml-support-g...@googlegroups.com
Note you're using the gx: extensions but haven't declared that namespace.

<?xml  version="1.0" encoding="UTF-8"?>
 <Placemark>
 <gx:Track>
 ...

You need to add the gx namespace like this:

<?xml  version="1.0" encoding="UTF-8"?>
  <Placemark>
    <gx:Track>

For more details see example here:
Reply all
Reply to author
Forward
0 new messages