mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
adding another template, working on roads export.
This commit is contained in:
parent
fff6a2d201
commit
f1f3498c71
2 changed files with 34 additions and 0 deletions
|
|
@ -3,7 +3,28 @@
|
|||
|
||||
// download map data as GeoJSON
|
||||
function saveGeoJSON() {
|
||||
saveGeoJSON_Cells();
|
||||
//saveGeoJSON_Roads();
|
||||
}
|
||||
|
||||
function saveGeoJSON_Roads() {
|
||||
// this is work-in-progress
|
||||
roads = routes.select("#roads");
|
||||
trails = routes.select("#trails");
|
||||
searoutes = routes.select("#searoutes");
|
||||
|
||||
console.log(typeof(roads));
|
||||
console.log(roads);
|
||||
|
||||
console.log(routes._groups);
|
||||
console.log(routes._groups[0]);
|
||||
console.log(routes._groups[0][0]);
|
||||
console.log(routes._groups[0][0].childNodes);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function saveGeoJSON_Cells() {
|
||||
let data = "{ \"type\": \"FeatureCollection\", \"features\": [\n";
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue