Get leaf nodes and write map.json