Changeset 2281

Show
Ignore:
Timestamp:
03/05/10 18:38:16 (5 months ago)
Author:
cb194
Message:

Re: #411 Added Copyright information to the WMS description information and made it available in the right click "get map info..." dialog.

Location:
FalconView/trunk/public/fvw_core
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • FalconView/trunk/public/fvw_core/MapDataServer/WMSMapServer/StdAfx.h

    r2144 r2281  
    5151#include "FvCore\Include\Registry.h"  // read fv registry entries such as HD_DATA 
    5252 
     53#import <msxml6.dll> named_guids rename_namespace("MSXML6") 
     54 
    5355#import "MapDataServer.tlb"   no_namespace, named_guids, exclude("IErrorInfo") 
    5456#import "MapDataServerUtil.tlb"   no_namespace, named_guids, exclude("IErrorInfo") 
  • FalconView/trunk/public/fvw_core/MapDataServer/WMSMapServer/WMSMapHandler.cpp

    r2053 r2281  
    2323#include "GDAL_priv.h" 
    2424#include "UtilityMethods.h" 
    25 #include "WMSDescription.h" 
     25#include "..\..\WMSMapSetup\WMSDescriptor.h" 
    2626 
    2727#include "SafeArray.h" 
     
    224224   *format = MAP_INFO_PLAIN_TEXT; 
    225225 
    226    WMSDescriptionXmlHandler WMSDesc; 
    227  
    228    WMSDesc.readWMSDescription(DescriptorFilenameFromSource(std::string(_bstr_t(map_source)))); 
     226   //WMSDescriptionXmlHandler WMSDesc; 
     227 
     228   //WMSDesc.readWMSDescription(DescriptorFilenameFromSource(std::string(_bstr_t(map_source)))); 
    229229   //*map_info_str = _bstr_t(L"Web Mapping Server Map Handler example\n\nGeorgia Tech Research Institute").copy(); 
     230   std::string file_spec = DescriptorFilenameFromSource(std::string(_bstr_t(map_source))); 
     231   WMSDescriptor WMSDesc; 
     232   WMSDesc.ReadXML(file_spec); 
     233    
    230234   std::stringstream info; 
    231235   info << "Web Map: \n"; 
    232    info << "\nService Type:\t" << WMSDesc.m_ServiceTypeName; 
     236   info << "\nService Type:\t" << WMSDesc.m_ServerType; 
    233237   info << "\nURL:         \t" << WMSDesc.m_ServerURL; 
     238   if (0==WMSDesc.m_ServerType.compare(std::string("WMS")) || 0==WMSDesc.m_ServerType.compare(std::string("TMS"))) 
     239   { 
     240      info << "\nLayer(s): \t" <<WMSDesc.m_Layers; 
     241   }    
    234242   info << "\nSpatial Refrence System: " << WMSDesc.m_SRS; 
    235243   info << "\nProjection:  \t" << WMSDesc.m_Projection; 
     
    239247   info << "\nSouthern Bound:\t" << WMSDesc.m_LowerRightY; 
    240248   info << "\nWestern Bound: \t" << WMSDesc.m_UpperLeftX; 
    241    info << "\n\nTile Levels:   \t" << WMSDesc.m_tileLevel; 
     249   info << "\n\nTile Levels:   \t" << WMSDesc.m_TileLevel; 
     250 
     251   info << "\n\n" << WMSDesc.m_Copyright; 
    242252   *map_info_str =  _bstr_t(info.str().c_str()).copy(); 
    243253   return S_OK; 
  • FalconView/trunk/public/fvw_core/MapDataServer/WMSMapServer/WMSMapServer.vcproj

    r2162 r2281  
    494494            </File> 
    495495            <File 
    496                 RelativePath=".\WMSDescription.cpp" 
    497                 > 
    498                 <FileConfiguration 
    499                     Name="Debug|Win32" 
    500                     > 
    501                     <Tool 
    502                         Name="VCCLCompilerTool" 
    503                         AdditionalIncludeDirectories="" 
    504                         PreprocessorDefinitions="" 
    505                     /> 
    506                 </FileConfiguration> 
    507                 <FileConfiguration 
    508                     Name="Govt Debug|Win32" 
    509                     > 
    510                     <Tool 
    511                         Name="VCCLCompilerTool" 
    512                         AdditionalIncludeDirectories="" 
    513                         PreprocessorDefinitions="" 
    514                     /> 
    515                 </FileConfiguration> 
    516                 <FileConfiguration 
    517                     Name="Govt Release|Win32" 
    518                     > 
    519                     <Tool 
    520                         Name="VCCLCompilerTool" 
    521                         AdditionalIncludeDirectories="" 
    522                         PreprocessorDefinitions="" 
    523                     /> 
    524                 </FileConfiguration> 
    525                 <FileConfiguration 
    526                     Name="Release|Win32" 
    527                     > 
    528                     <Tool 
    529                         Name="VCCLCompilerTool" 
    530                         AdditionalIncludeDirectories="" 
    531                         PreprocessorDefinitions="" 
    532                     /> 
    533                 </FileConfiguration> 
     496                RelativePath="..\..\WMSMapSetup\WMSDescriptor.cpp" 
     497                > 
    534498            </File> 
    535499            <File 
     
    671635            </File> 
    672636            <File 
    673                 RelativePath=".\WMSDescription.h" 
    674                 > 
    675             </File> 
    676             <File 
    677637                RelativePath=".\WMSMapHandler.h" 
    678638                > 
  • FalconView/trunk/public/fvw_core/WMSMapSetup/WMSDescriptor.cpp

    r2220 r2281  
    8080            m_ServerURL    = ReadStringValue(L"Service/ServerUrl");            
    8181            m_CachePath    = ReadStringValue(L"Cache/Path",L""); 
     82            m_Copyright    = ReadStringValue(L"Copyright",L""); 
     83            //std::string data = m_Copyright; 
     84            //m_Copyright = m_Copyright.replace("&amp;","&").replace("&lt;","<").replace("&#10;","\n"); 
     85            //m_Copyright = m_Copyright.replace("&quot;","\"").replace("&gt;",">").replace("&#13;","\r"); 
     86 
    8287 
    8388            if (0==m_ServerType.compare("TMS")) 
     
    150155   WriteStringValue(std::string("Service/ServerUrl"),m_ServerURL); 
    151156 
     157   std::string data = m_Copyright; 
     158   //data = data.replace("&", "&amp;").replace("<","&lt;").replace("\n","&#10;"); 
     159   //data = data.replace("\"", "&quot;").replace(">", "&gt;").replace("\r", "&#13;"); 
     160   if(0!=m_Copyright.compare(std::string(""))) WriteStringValue(std::string("Copyright"),data); 
     161 
    152162   if(0!=m_CachePath.compare(std::string(""))) WriteStringValue(std::string("Cache/Path"),m_CachePath); 
    153163 
  • FalconView/trunk/public/fvw_core/WMSMapSetup/WMSDescriptor.h

    r2207 r2281  
    3434   std::string m_Projection; //Spatial Refrence System e.g. EPSG:26904 
    3535   std::string m_Version;   //WMS or TMS version 
    36    std::string m_CachePath;              
     36   std::string m_CachePath;         
     37 
     38   std::string m_Copyright; // Added for FV string to display map server Copyright info 
    3739 
    3840private: 
  • FalconView/trunk/public/fvw_core/WMSMapSetup/WMSMapSetup.rc

    r2220 r2281  
    5555 
    5656 
    57  
    58  
    5957///////////////////////////////////////////////////////////////////////////// 
    6058// 
     
    7674END 
    7775 
    78 IDD_WMS_MAP_SETUP DIALOGEX 0, 0, 287, 345 
     76IDD_WMS_MAP_SETUP DIALOGEX 0, 0, 287, 367 
    7977STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE 
    8078FONT 8, "MS Sans Serif", 0, 0, 0x0 
     
    9896    EDITTEXT        IDC_BLOCK_SIZE_X,63,258,73,14,ES_AUTOHSCROLL | ES_NUMBER 
    9997    EDITTEXT        IDC_BLOCK_SIZE_Y,161,259,73,14,ES_AUTOHSCROLL | ES_NUMBER 
    100     DEFPUSHBUTTON   "Add To FalconView",IDC_ADD_MAP,193,321,87,17 
    101     EDITTEXT        IDC_DESCRIPTION_BOX,7,276,273,41,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL 
     98    DEFPUSHBUTTON   "Add To FalconView",IDC_ADD_MAP,193,343,87,17 
     99    EDITTEXT        IDC_DESCRIPTION_BOX,7,296,273,41,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL 
    102100    RTEXT           "Short Name:",IDC_STATIC,162,35,50,11 
    103101    RTEXT           "WMS Map Name:",IDC_STATIC,7,34,59,13 
     
    121119    RTEXT           "Overview Count:",IDC_STATIC,138,240,54,11 
    122120    EDITTEXT        IDC_MAP_NAME,67,34,93,13,ES_AUTOHSCROLL 
    123     PUSHBUTTON      "Remove From FalconView",IDC_REMOVE_MAP,99,321,87,17 
    124     PUSHBUTTON      "Test Settings",IDC_TEST,7,321,87,17 
     121    PUSHBUTTON      "Remove From FalconView",IDC_REMOVE_MAP,99,343,87,17 
     122    PUSHBUTTON      "Test Settings",IDC_TEST,7,343,87,17 
     123    EDITTEXT        IDC_COPYRIGHT,63,279,205,13,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN 
     124    RTEXT           "Copyright:",IDC_STATIC,7,282,51,11 
    125125END 
    126126 
     
    147147        RIGHTMARGIN, 280 
    148148        TOPMARGIN, 7 
    149         BOTTOMMARGIN, 338 
     149        BOTTOMMARGIN, 360 
    150150    END 
    151151END 
  • FalconView/trunk/public/fvw_core/WMSMapSetup/WMSMapSetupDlg.cpp

    r2220 r2281  
    9696   , m_TileSizeY(1024) 
    9797   , m_MapName(_T("WMSMap")) 
     98   , m_Copyright(_T("")) 
    9899{ 
    99100   TRACE("CWMSMapSetupDlg::CWMSMapSetupDlg(CWnd* pParent /*=NULL*/) \n"); 
     
    135136   DDV_MaxChars(pDX, m_MapName, 40); 
    136137   DDX_Control(pDX, IDC_SERVER_TYPE2, ImageFormatCombo); 
     138   DDX_Text(pDX, IDC_COPYRIGHT, m_Copyright); 
     139    DDV_MaxChars(pDX, m_Copyright, 500); 
    137140} 
    138141 
     
    190193   m_TileSizeY = m_DescFile->m_TileSizeY; 
    191194   m_TileLevel = m_DescFile->m_TileLevel; 
     195   m_Copyright = toCString(m_DescFile->m_Copyright);    
    192196   if (m_DescFile->m_OverviewCount>0) 
    193197   { 
     
    276280   m_DescFile->m_TileSizeY= m_TileSizeY; 
    277281   m_DescFile->m_TileLevel= m_TileLevel; 
     282   m_DescFile->m_Copyright= toStdString(m_Copyright); 
    278283   m_DescFile->m_OverviewCount=m_OverviewCount; 
    279284   m_numLevels = (m_OverviewCount>0? m_OverviewCount : m_TileLevel); 
  • FalconView/trunk/public/fvw_core/WMSMapSetup/WMSMapSetupDlg.h

    r2220 r2281  
    117117   afx_msg void OnBnClickedRemoveMap(); 
    118118   afx_msg void OnBnClickedTest(); 
     119   CString m_Copyright; 
    119120}; 
  • FalconView/trunk/public/fvw_core/WMSMapSetup/resource.h

    r2220 r2281  
    3131#define IDC_IMAGE_PROJECTION2           221 
    3232#define IDC_CANCEL                      222 
     33#define IDC_SERVER_LAYERS2              222 
     34#define IDC_COPYRIGHT                   222 
    3335#define IDC_HELP_BUTTON                 223 
    3436#define IDC_MAP_NAME                    224