export of marker data (#305)

* export of marker data
fixed elevation in burgs and cells export
fixed population in cells export

* exporting type (island, lake, etc.) as well now

* bugfix in burgs export
This commit is contained in:
Tom 2019-09-17 09:25:49 +02:00 committed by Azgaar
parent d5ec72b6b8
commit 93b6b60f0c
2 changed files with 40 additions and 10 deletions

View file

@ -259,7 +259,7 @@ function editBurgs() {
data += b.name + ",";
const province = pack.cells.province[b.cell];
data += province ? pack.provinces[province].fullName + "," : ",";
data += b.state ? pack.states[b.state].fullName : pack.states[b.state].name + ",";
data += b.state ? pack.states[b.state].fullName +"," : pack.states[b.state].name + ",";
data += pack.cultures[b.culture].name + ",";
data += pack.religions[pack.cells.religion[b.cell]].name + ",";
data += rn(b.population * populationRate.value * urbanization.value) + ",";
@ -267,11 +267,11 @@ function editBurgs() {
// add geography data
data += mapCoordinates.lonW + (b.x / graphWidth) * mapCoordinates.lonT + ",";
data += mapCoordinates.latN - (b.y / graphHeight) * mapCoordinates.latT + ","; // this is inverted in QGIS otherwise
data += parseInt(getHeight(pack.cells.h[b.cell])) + ",";
data += parseInt(getFriendlyHeight([b.x,b.y])) + ",";
// add status data
data += b.capital ? "capital," : ",";
data += b.port ? "port\n" : "\n";
data += b.capital ? "true," : "false,";
data += b.port ? "true\n" : "false\n";
});
const dataBlob = new Blob([data], {type: "text/plain"});