Skip to content

id ignored #39

@supersonicclay

Description

@supersonicclay

I'd expect tokml to take the id property from a GeoJSON Feature and use for the id attribute of the <Placemark>(https://developers.google.com/kml/documentation/kmlreference#placemark).

Repro

const tokml = require('tokml')
const geojson = { type: 'Feature', id: 'abc', properties: {}, geometry: {type: 'Point', coordinates: [1,2]}};
tokml(geojson)

Actual

<?xml version="1.0" encoding="UTF-8"?>
<kml
  xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Placemark>
      <ExtendedData></ExtendedData>
      <Point>
        <coordinates>1,2</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

Expected

<?xml version="1.0" encoding="UTF-8"?>
<kml
  xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Placemark id="abc">
      <ExtendedData></ExtendedData>
      <Point>
        <coordinates>1,2</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions