question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I want to render KML using this, but I’m running into problems.

I have something like this

const folder = props => (
  <Folder>
    {props.children}
  </Folder>
);

const KML = () => (
  <kml>
    <folder>
      foo
    </folder>
  </kml>
);

What I want as output:

<kml>
  <Folder>
    foo
  </Folder>
</kml>

What I get is:

  <kml>
    <folder>
      foo
    </folder>
  </kml>

I passed xml: true to renderToString.

Is there a convention in the casing of JSX tags?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
developitcommented, Feb 6, 2017

Hi @Scarysize - it actually looks like rendering uppercase tags is already supported, just it’s not a feature of JSX (which we can’t change). You’ll have to do something like this:

const Folder = 'Folder';

const KML = () => (
  <kml>
    <Folder>
      foo
    </Folder>
  </kml>
);

… which is easier to understand when you look at what that transpiles to:

const Folder = 'Folder';

const KML = () => (
  h('kml', null,
    h(Folder, null,
      'foo'
    )
  )
);
1reaction
Scarysizecommented, Jan 24, 2017

That would be much appreciated!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Displaying KML | Maps JavaScript API - Google Developers
This tutorial shows you how to display information of a KML file in a Google map and sidebar. For more information on using...
Read more >
Overlays and KMLs – Google Earth Studio
You can import your own KML / KMZ files in Earth Studio. ... Rendering overlays in real-time (for playback and navigation) is an...
Read more >
KML - OpenLayers
Rendering KML with a vector source. This example uses the ol/format/KML to parse KML for rendering with a vector source. main.js.
Read more >
KML | Help - Mapbox docs
KML is a file format that is commonly used in Google products. KML is similar to GeoJSON and can store points, lines, polygons,...
Read more >
How to Render KML "Hatched" Polygon Symbology in Google ...
Unfortunately KML (and KMZ) does not support fancy fill symbols like markers or hatching.. have a read of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found