I have below codes:
<pre id="eventoutput">Result Output: ...</pre>
<script> // Show Output
(function (L, document) {
map.on('measurefinish', function (evt) {
writeResults(evt);
});
function writeResults (results) {
document.getElementById('eventoutput').innerHTML = JSON.stringify({
Points: results.points
}, null, 2);
}
})(window.L, window.document);
</script>
And its output is shown as
{
"Points": [
{
"lat": 11.570852645045665,
"lng": 104.79034423828126
},
{
"lat": 11.61121119698555,
"lng": 104.85076904296876
},
{
"lat": 11.566816469367417,
"lng": 104.88235473632814
}
]
}
But I want to format it as a table with Column name Points, Lat, Lng and Row representing each data.
Could you please help me how I can accomplish this.