| 436 | } |
| 437 | |
| 438 | std::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 | |
| 464 | std::vector<std::string> GetFilePathsToLoadFromKmz(std::string const & filePath) |
| 465 | { // Extract KML files from KMZ archive and save to temp KMLs with unique name. |