started with eval

This commit is contained in:
2017-03-24 13:31:31 +01:00
parent 94b7e59953
commit 25e9b823eb
8 changed files with 567 additions and 13 deletions

29
Helper.h Normal file
View File

@@ -0,0 +1,29 @@
#ifndef LEHELPER_H
#define LEHELPER_H
#include <fstream>
#include <Indoor/geo/EarthPos.h>
class LeHelper {
public:
static void writeGoogleLine(std::vector<EarthPos>& poss) {
const std::string file = "/apps/android/workspace/OTHER2017/osm/googleLine.js";
std::ofstream out(file);
out << "function getLines() {return [\n";
out.precision(15);
for (const EarthPos& pos : poss) {
out << "\t{" << "lat:" << pos.lat << ", lng:" << pos.lon << "},\n";
}
out << "];}";
out.flush();
out.close();
}
};
#endif // HELPER_H