diff --git a/maps/template_vertical.txt b/maps/template_vertical.txt new file mode 100644 index 00000000..f86c7056 --- /dev/null +++ b/maps/template_vertical.txt @@ -0,0 +1,13 @@ +Hill 1 90-100 45-55 25-30 +Hill 1 60-80 45-55 70-75 +Hill 1 60-80 30-50 40-50 +Hill 1 40-50 50-70 40-60 +Multiply 0.6 20-100 0 0 +Smooth 1 0 0 0 +Range 0-2 40-50 30-60 30-60 +Trough 1-3 20-40 25-75 20-80 +Smooth 2 0 0 0 +Pit 3-5 10-30 15-85 20-80 +Hill 3-5 10-30 20-80 20-80 +Range 1-2 20-50 30-70 20-65 +Trough 1-2 20-50 15-85 20-80 diff --git a/modules/save-and-load.js b/modules/save-and-load.js index ea1e9479..7af3977e 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -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";