Changeset 2316

Show
Ignore:
Timestamp:
03/10/10 12:31:39 (5 months ago)
Author:
JO94
Message:

fixed loading of data from KMZ retrieved within network links

Location:
FalconView/trunk/public/fvw_core/GeodataDataSources
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • FalconView/trunk/public/fvw_core/GeodataDataSources/KMLNetworkLinkResource.cpp

    r2306 r2316  
     1// Copyright (c) 1994-2010 Georgia Tech Research Corporation, Atlanta, GA 
     2// This file is part of FalconView(tm). 
     3 
     4// FalconView(tm) is free software: you can redistribute it and/or modify 
     5// it under the terms of the GNU Lesser General Public License as published by 
     6// the Free Software Foundation, either version 3 of the License, or 
     7// (at your option) any later version. 
     8 
     9// FalconView(tm) is distributed in the hope that it will be useful, 
     10// but WITHOUT ANY WARRANTY; without even the implied warranty of 
     11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     12// GNU Lesser General Public License for more details. 
     13 
     14// You should have received a copy of the GNU Lesser General Public License 
     15// along with FalconView(tm).  If not, see <http://www.gnu.org/licenses/>. 
     16 
     17// FalconView(tm) is a trademark of Georgia Tech Research Corporation. 
     18 
    119// KMLNetworkLinkResource.cpp 
    220// 
     
    2644   std::string errors; 
    2745   m_kmlFile = kmlengine::KmlFile::CreateFromParse(kml_data, &errors); 
     46   if (kmlengine::KmzFile::IsKmz(kml_data)) 
     47      m_kmz_file = kmlengine::KmzFile::OpenFromString(kml_data); 
    2848 
    2949   __super::Load(); 
     
    4363      CLibkmlDataSource* ds = (CLibkmlDataSource*)CInternalObjectRegistry::GetObject(handle); 
    4464 
    45       ds->SetKmlFilePath(ResolvedUri()); 
    46  
     65      ds->SetKmlFilePathAndKmzFile(ResolvedUri(), m_kmz_file); 
    4766      ds->WrapKMLFile(m_kmlFile); 
    4867 
  • FalconView/trunk/public/fvw_core/GeodataDataSources/KMLNetworkLinkResource.h

    r2277 r2316  
     1// Copyright (c) 1994-2010 Georgia Tech Research Corporation, Atlanta, GA 
     2// This file is part of FalconView(tm). 
     3 
     4// FalconView(tm) is free software: you can redistribute it and/or modify 
     5// it under the terms of the GNU Lesser General Public License as published by 
     6// the Free Software Foundation, either version 3 of the License, or 
     7// (at your option) any later version. 
     8 
     9// FalconView(tm) is distributed in the hope that it will be useful, 
     10// but WITHOUT ANY WARRANTY; without even the implied warranty of 
     11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     12// GNU Lesser General Public License for more details. 
     13 
     14// You should have received a copy of the GNU Lesser General Public License 
     15// along with FalconView(tm).  If not, see <http://www.gnu.org/licenses/>. 
     16 
     17// FalconView(tm) is a trademark of Georgia Tech Research Corporation. 
     18 
    119// KMLNetworkLinkResource.h 
    220// 
     
    523 
    624#include "KMLResource.h" 
    7 #include "kml/engine/kml_file.h" 
     25#include "kml/dom.h" 
     26#include "kml/engine.h" 
    827 
    928class CLibkmlNetworkLink; 
     
    1332   CLibkmlNetworkLink *m_pParentNetworkLink; 
    1433   kmlengine::KmlFilePtr m_kmlFile; 
     34   kmlengine::KmzFilePtr m_kmz_file; 
    1535   IFvDataSourcePtr m_wrappedDataSource; 
    1636 
  • FalconView/trunk/public/fvw_core/GeodataDataSources/LibkmlDataSource.cpp

    r2307 r2316  
    375375      return; 
    376376   } 
     377 
    377378   if (m_kmz_file && !CUtilityMethods::LooksLikeHttp(path)) 
    378379   { 
  • FalconView/trunk/public/fvw_core/GeodataDataSources/LibkmlDataSource.h

    r2306 r2316  
    138138   void WrapKMLFile(const kmlengine::KmlFilePtr& kml_file); 
    139139 
    140    void SetKmlFilePath(const std::string& path) { m_kml_file_path = path; } 
     140   void SetKmlFilePathAndKmzFile(const std::string& path, kmlengine::KmzFilePtr kmz_file) 
     141   { 
     142      m_kml_file_path = path; 
     143      m_kmz_file = kmz_file; 
     144   } 
    141145 
    142146   // ILibkmlDataSource Methods