8000 id ignored · Issue #39 · mapbox/tokml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

id ignored #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
supersonicclay opened this issue Dec 17, 2018 · 1 comment
Open

id ignored #39

supersonicclay opened this issue Dec 17, 2018 · 1 comment

Comments

@supersonicclay
Copy link
supersonicclay commented Dec 17, 2018

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>
kriscarle added a commit to maphubs/tokml that referenced this issue Jan 14, 2019
@kriscarle
Copy link
kriscarle commented Jan 14, 2019

@supersonicclay I've added this to my fork here https://github.com/maphubs/tokml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0