root/FalconView/trunk/public/fvw_core/WMSMapSetup/WMSMapSetupDlg.h @ 2220

Revision 2220, 4.0 KB (checked in by cb194, 7 months ago)

See #411. WMS Map Setup OCX was updated because it was hanging when inserted into an MFC DLL. Also Fixed the version information to reflect the build number and cleaned up some string comparisons so proper XML is generated.

Line 
1// Copyright (c) 1994-2009 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
19#pragma once
20#include "afxwin.h"
21
22class CWMSMapSetupCtrl;
23class WMSDescriptor;
24
25// CWMSMapSetupDlg dialog
26
27class CWMSMapSetupDlg : public CDialog
28{
29    DECLARE_DYNAMIC(CWMSMapSetupDlg)
30
31public:
32    CWMSMapSetupDlg(CWnd* pParent = NULL);   // standard constructor
33    virtual ~CWMSMapSetupDlg();
34
35   void set_parent(CWMSMapSetupCtrl *parent);
36
37// Dialog Data
38    enum { IDD = IDD_WMS_MAP_SETUP };
39
40protected:
41    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
42   
43   // Class that wraps the XML of a WMS Description File
44   WMSDescriptor *m_DescFile;
45   
46   int m_numLevels;
47   CString m_sProjection;
48
49   CWMSMapSetupCtrl *m_parent;
50   long m_CalcedImageSizeX;
51   long m_CalcedImageSizeY;
52   double m_CalcedDegPerPixelX;
53   double m_CalcedDegPerPixelY;
54
55   bool AddToSeriesTable();
56   bool AddToGroups();
57   bool RemoveFromSeriesTable();
58   bool RemoveFromGroups();
59
60    DECLARE_MESSAGE_MAP()
61public:
62
63   afx_msg void OnBnClickedInsertData();
64   virtual BOOL OnInitDialog();
65
66   CString m_WMSDescriptionPath;
67
68   // Name of new map type (Series Name) must match the name of the XML Description File
69   CString m_MapName;
70   CString m_ShortName;
71   CString m_WMSProperties;
72   afx_msg void OnBnClickedBrowse();
73   afx_msg void OnBnClickedAddMap();
74   // Server Type Value (TMS, WorldWind,WMS...)
75   CString m_ServerType;
76   // // Image Type (image/JPEG, image/PNG...)
77   CString m_ImageFormat;
78   // // WMS Version (1.1.1, 1.3.0...)
79   CString m_Version;
80   // // Server URL (http://onearth.jpl.nasa.gov/wms.cgi?)
81   CString m_ServerURL;
82   // Comma seperated list of WMS Layers (modis,global_mosaic)
83   CString m_Layers;
84   // // Coordinate of upper Left corner (-180.0)
85   double m_UpperLeftX;
86   // //Coordinate of upper Right Y (90.0)
87   double m_UpperLeftY;
88   // // Coordinate of Lower Right coorner (180.0)
89   double m_LowerRightX;
90   // Coordinate of Lower Right Y (-90.0)
91   double m_LowerRightY;
92   // // Image Size in Pixels (may be caluculated from Tile Count, Block Size and Tile Level)
93   long m_lImageSizeX;
94   // // Image Size in Pixels (may be caluculated from Tile Count, Block Size and Tile Level)
95   long m_lImageSizeY;
96   // Tile level at highest resolution. (tiled image sources only, optional, defaults to 0)
97   int m_TileLevel;
98   // Projection used in web requests (note the Upper Left and Lower Right are expressed in this projection) (EPSG:4326)
99   CString m_Projection;
100   // Count of reduced resolution layers each having 2 times lower resolution. (optional, default is calculated at runtime)
101   int m_OverviewCount;
102   // // Tile/Block Size in pixels defaults to 1024
103   int m_TileSizeX;
104   // Tile / Block Size in pixels (Defaults to 1024)
105   int m_TileSizeY;
106
107protected:
108   // // Open the XML Description and calculate Deg per Pixel
109
110   bool WriteXMLDescription(CString XMLFile);
111   int CalculateDegPerPixel(CString XMLFile);
112   void ImportXMLSettings(CString XMLFile);
113   void UpdateServerOptions();
114public:
115   CComboBox ImageFormatCombo;
116   afx_msg void OnCbnCloseupServerType();
117   afx_msg void OnBnClickedRemoveMap();
118   afx_msg void OnBnClickedTest();
119};
Note: See TracBrowser for help on using the browser.