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

Function GetKMLOrGPXFilesPathsToLoad

libs/map/bookmark_helpers.cpp:438–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438std::vector<std::string> GetKMLOrGPXFilesPathsToLoad(std::string const & filePath)
439{
440 std::string const fileExt = GetLowercaseFileExt(filePath);
441 if (fileExt == kKmlExtension)
442 {
443 return GetFilePathsToLoadFromKml(filePath);
444 }
445 else if (fileExt == kGpxExtension)
446 {
447 return GetFilePathsToLoadFromGpx(filePath);
448 }
449 else if (fileExt == kKmbExtension)
450 {
451 return GetFilePathsToLoadFromKmb(filePath);
452 }
453 else if (fileExt == kKmzExtension)
454 {
455 return GetFilePathsToLoadFromKmz(filePath);
456 }
457 else
458 {
459 LOG(LWARNING, ("Unknown file type", filePath));
460 return {};
461 }
462}
463
464std::vector<std::string> GetFilePathsToLoadFromKmz(std::string const & filePath)
465{ // Extract KML files from KMZ archive and save to temp KMLs with unique name.

Callers 2

LoadBookmarkRoutineMethod · 0.85
UNIT_TESTFunction · 0.85

Calls 5

GetLowercaseFileExtFunction · 0.85

Tested by 1

UNIT_TESTFunction · 0.68