www.pudn.com > MapMark.rar > MapMarkView.h


 // MapMarkView.h : interface of the CMapMarkView class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_MAPMARKVIEW_H__CF11397A_8101_4CC8_9A2D_FD0E3B447F2D__INCLUDED_) 
#define AFX_MAPMARKVIEW_H__CF11397A_8101_4CC8_9A2D_FD0E3B447F2D__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "MapX.h" 
#include "MainFrm.h" 
#include "MarkObj.h" 
#include  
 
#define MAIN_MAP_NAME		"CHINA.GST"		//航迹图层名"Orig.gst" 
#define SEA_COLOR			RGB(208,244,255) 
#define SYMBOL_FONT_NAME	"宋体"//"Times New Roman"   
 
class CMapMarkView : public CView 
{ 
protected: // create from serialization only 
	CMapMarkView(); 
	DECLARE_DYNCREATE(CMapMarkView) 
 
// Attributes 
public: 
	CMapMarkDoc* GetDocument(); 
 
// Operations 
public: 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CMapMarkView) 
	public: 
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view 
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 
	protected: 
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); 
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); 
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	virtual ~CMapMarkView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
	 
private: 
	CMainFrame *m_pMainFrame;		//父窗口指针 
 
//	CString m_strFullPath;			//当前路径 
//	CString m_strMapPath;			//当前地图路径 
	 
	double	m_dInitZoom;			//初始缩放比例0822 
	double	m_dInitCenterX; 
	double	m_dInitCenterY; 
	 
//	double m_dLongitude1,m_dLongitude2; 
//	double m_dLatitude1,m_dLatitude2; 
 
	bool m_bSymbolMove; 
	CString m_strSelectKey;		//选中图元的FeatureKey 
	CMapXLayer m_Selectlayer;	//选中图元所在图层 
	int m_iSelectCount; 
 
//	CMapXPoints		m_pNodeSet;		//轨迹点集 
//	CMapXFeature	m_ftrTrackLine; 
 
//	CArray m_MarkArray;		//地图标记动态数组 
//	CCriticalSection  m_CS;						//临界区 
	 
//	int AddToTail(CMarkObj MarkData);			//添加标记 返回值 非0:队列长度 0:失败 
//	CMarkObj GetAt(int index);					//从队列获取一个标记对象 
//	void SetAt(int index, CMarkObj MarkData);	//设置队列中某标记对象 
//	int DeleteOne(int index);					//删除一个标记 返回值 非0:队列长度 0:失败  
//	int DeleteAll();							//删除所有标记 返回值 1:成功 0:失败 
//	int GetMarkNum();							//统计数组中所有对象的数目 >0  
//	int SearchByKey(CString strFeatureKey);		//按键值查 返回值:>0 对象在数组中的下标,-1 没找到 
//	void DrawTrackLine(double dX, double dY);					//根据新 
 
//	CString GetExeFilePath();	//获取当前工作路径 
//	void GetMapBound();			//从配置文件获取地图显示范围 
	void MapRectBound();		//限定地图显示范围 
	void ClearLayer(CString strLayerName);	//清除指定图层中的所有图元 
	//小数地理坐标==〉标准地理坐标(度分秒) 
	void DecimalGeoToStandardGeo(double dX, double dY, int *iXd, int *iXm, int *iXs, int *iYd, int *iYm, int *iYs); 
	void OnCustomDeleteSymbol(double X, double Y); 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CMapMarkView) 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg void OnSetFocus(CWnd* pOldWnd); 
	afx_msg void OnMapArrow(); 
	afx_msg void OnMapCenter(); 
	afx_msg void OnMapPan(); 
	afx_msg void OnMapZoomin(); 
	afx_msg void OnMapZoomout(); 
	afx_msg void OnUpdateMapArrow(CCmdUI* pCmdUI); 
	afx_msg void OnUpdateMapCenter(CCmdUI* pCmdUI); 
	afx_msg void OnUpdateMapPan(CCmdUI* pCmdUI); 
	afx_msg void OnUpdateMapZoomin(CCmdUI* pCmdUI); 
	afx_msg void OnUpdateMapZoomout(CCmdUI* pCmdUI); 
	afx_msg void OnMapViewChangedMap(); 
	afx_msg void OnSymbolCut(); 
	afx_msg void OnUpdateSymbolCut(CCmdUI* pCmdUI); 
	afx_msg void OnSymbolMove(); 
	afx_msg void OnUpdateSymbolMove(CCmdUI* pCmdUI); 
	afx_msg void OnButton1(); 
	afx_msg void OnUpdateButton1(CCmdUI* pCmdUI); 
	afx_msg void OnButton2(); 
	afx_msg void OnButton3(); 
	afx_msg void OnButton4(); 
	afx_msg void OnButton5(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
 
//	void OnDblClick(); 
	void OnMouseDown_Map(short Button, short Shift, long X, long Y); 
	void OnMouseUp_Map(short Button, short Shift, long X, long Y); 
	void OnMouseMove_Map(short Button, short Shift, long X, long Y); 
	void OnToolUsed(short ToolNum, double X1, double Y1, double X2, double Y2, double Distance, bool Shift, bool Ctrl, bool *EnableDefault); 
	DECLARE_EVENTSINK_MAP() 
}; 
 
#ifndef _DEBUG  // debug version in MapMarkView.cpp 
inline CMapMarkDoc* CMapMarkView::GetDocument() 
   { return (CMapMarkDoc*)m_pDocument; } 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_MAPMARKVIEW_H__CF11397A_8101_4CC8_9A2D_FD0E3B447F2D__INCLUDED_)