I have a program that automatically generates KML files for use with Google Earth. My most recent output is pasted below:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<Placemark>
<name>Active Location</name>
<address>60 NORTH WILLOW STREET, MONTCLAIR, ESSEX County, New Jersey</address>
</Placemark>
</Document>
</kml>
When this file is opened, a rectangular polygon is generated around the placemark, like so:
Saving the placemark as another document gives the following content:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>QueryOutput.KML</name>
<Placemark>
<name>Active Location</name>
<address>60 NORTH WILLOW STREET, MONTCLAIR, ESSEX County, New Jersey</address>
<MultiGeometry>
<Point>
<coordinates>-74.2122552,40.8157007,0</coordinates>
</Point>
<LinearRing>
<coordinates>
-74.21556655758907,40.81321718180819,0 -74.21556655758907,40.81818421819181,0 -74.20894384241093,40.81818421819181,0 -74.20894384241093,40.81321718180819,0 -74.21556655758907,40.81321718180819,0
</coordinates>
</LinearRing>
</MultiGeometry>
</Placemark>
</Document>
</kml>
Users must be able to collect the latitude/longitude data of the Point, which is then copied into another form. Because the placemark is defined as a MultiGeometry, they do not have easy access to this data. What changes need to be made to the initial KML file to prevent the placemark from generating a MultiGeometry? I've tried placing the name and address tags inside a Point, but that causes the coordinates to be set to 0,0,0 when the file is loaded.
