Issue parsing customized placemarks

47 views
Skip to first unread message

Andrew Smith

unread,
Dec 2, 2016, 3:27:18 AM12/2/16
to Java API for KML
Hi,

I'm trying to write some code to parse and manipulate KML that has customized placemarks.  I've spent a good bit of time experimenting with JAK but am unable to find a way to retrieve these features when unmarshalling the KML.  A simplified example of this type of KML is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<Document>
    <name>silly example</name>
    <Schema parent="Placemark" name="HomeMark">
        <SimpleField name="HomeAddress" type="string"/>
    </Schema>
    <HomeMark>
        <name>Home Sweet Home</name>
        <HomeAddress>123 Main Street, Fivemile, OH</HomeAddress>
        <description>Big cornfield!</description>
        <LookAt>
            <longitude>-83.90737439782715</longitude>
            <latitude>39.10333991321394</latitude>
            <altitude>0</altitude>
            <heading>12.85261856806695</heading>
            <tilt>38.00580009639287</tilt>
            <range>298.624862043432</range>
            <gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
        </LookAt>
        <Point>
            <gx:drawOrder>1</gx:drawOrder>
            <coordinates>-83.90737439782715,39.10333991321395,0</coordinates>
        </Point>
    </HomeMark>
</Document>
</kml>

My research suggests that this sort of construct may have been deprecated (or at least discouraged) after KML 2.1 however this KML still works fine in Google Earth and I would like access these types of placemarks with JAK if possible.

Some perhaps relevant information:



Appreciate any suggestions!

Thanks,

-Andy Smith 


Reply all
Reply to author
Forward
0 new messages