MCPcopy Create free account
hub / github.com/comaps/comaps / LoadKmlFile

Function LoadKmlFile

libs/map/bookmark_helpers.cpp:419–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419std::unique_ptr<kml::FileData> LoadKmlFile(std::string const & file, KmlFileType fileType)
420{
421 std::unique_ptr<kml::FileData> kmlData;
422 try
423 {
424 kmlData = LoadKmlData(FileReader(file), fileType);
425 if (kmlData != nullptr)
426 FillEmptyNames(kmlData, file);
427 }
428 catch (std::exception const & e)
429 {
430 LOG(LWARNING, ("KML", fileType, "loading failure:", e.what()));
431 kmlData.reset();
432 }
433 if (kmlData == nullptr)
434 LOG(LWARNING, ("Loading bookmarks failed, file", file));
435 return kmlData;
436}
437
438std::vector<std::string> GetKMLOrGPXFilesPathsToLoad(std::string const & filePath)
439{

Callers 7

ProcessNextKmlMethod · 0.85
LoadBookmarksMethod · 0.85
LoadBookmarkRoutineMethod · 0.85
ReloadBookmarkRoutineMethod · 0.85
UNIT_CLASS_TESTFunction · 0.85
UNIT_TESTFunction · 0.85

Calls 5

LoadKmlDataFunction · 0.85
FillEmptyNamesFunction · 0.85
FileReaderClass · 0.50
whatMethod · 0.45
resetMethod · 0.45

Tested by 2

UNIT_CLASS_TESTFunction · 0.68
UNIT_TESTFunction · 0.68