30 lines
541 B
C++
30 lines
541 B
C++
#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
|