#ifndef LEHELPER_H #define LEHELPER_H #include #include class LeHelper { public: static void writeGoogleLine(std::vector& 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