Is there a way to get the KML file attached to this Google Map in JSON format instead of XML?:
I'm currently writing an app that needs to load this KML data. I would prefer that it's in JSON format. Is there a way of getting it in this format?
Is there a way to get the KML file attached to this Google Map in JSON format instead of XML?:
I'm currently writing an app that needs to load this KML data. I would prefer that it's in JSON format. Is there a way of getting it in this format?
Share Improve this question edited Nov 17, 2011 at 18:24 John Conde 220k99 gold badges462 silver badges501 bronze badges asked Nov 17, 2011 at 18:14 CamsoftCamsoft 12k20 gold badges85 silver badges124 bronze badges2 Answers
Reset to default 7Since KML is just a flavor of XML, you could use any XML to JSON converter, of which there are many.
Here's one that's been around for a few years: http://www.thomasfrank.se/xml_to_json.html
I was trying to convert KML files to JSON and it was the most useful tool I found to do it programmatically
https://github./mapbox/togeojson#using-it-as-a-console-utility
It is with nodejs, you should do something like that in the cli
togeojson file.kml > file.geojson
Then, you can pass it into a json quite easy
Anyway, hope this help