Theme,Symbol,Style Problems using CMapX

zubasha 2006-07-19 07:30:23
hi,all..
There are some questions need help.I am using vc6.0 and mapx 5
1:
I created a theme for the dataset in ranged type.
but I want to set the range in custom type.What are the
steps I should follow?Can u show me an sample?

2:
How to set the the different style to the different range feature,especially the symbol?I want to create an Dialog for the symbol selection,but I don't know where to get the symbol list and how to paint it in the CComboBox..

3:
After I choose the symbol and close the application,I open the application again,how can I load the symbol last time I selected.In another words,how can I store the symbol selection in the harddisk.Is there any symbol ID or anothere unique digital I can store which indicating the symbol I have selectd.Does anybody have the experience in this section?

I will be very thankful if anyone could offer me some help.Thank u very much.
...全文
125 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
letheanwater 2006-07-20
  • 打赏
  • 举报
回复
第一个没明白你的意思

第二个问题,mapx下有一个icons还是什么的文件夹里,存储的是符号。你要读取可以从这里读取,你自定义的也可以放在这里。
不过对不同类型设置不同的符号我在mapinfo系列里没有试过,没办法提建议。

第三个问题,你选择以后对整个图层进行符号修改就可以了。这个可以参考mapinfo的实现
#if !defined(AFX_CAR_H__85FED81E_252B_4F7D_BCB7_92A9ED40891F__INCLUDED_) #define AFX_CAR_H__85FED81E_252B_4F7D_BCB7_92A9ED40891F__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // Car.h : header file // #include "mapx.h" typedef struct{ char strID[11]; char strName[21]; int nType; StateType nState; double dMapX; double dMapY; double dSpeed; double dDirection; double dX; // 当前位置X坐标 double dY; // 当前位置Y坐标 long lFeaID; // 车辆符号的ID SelectType nSelect; }SCar; class CMapView; ///////////////////////////////////////////////////////////////////////////// // CCar command target class CCar : public CCmdTarget { DECLARE_DYNCREATE(CCar) public: CCar(); // protected constructor used by dynamic creation virtual ~CCar(); // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CCar) //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CCar) // NOTE - the ClassWizard will add and remove member functions here. //}}AFX_MSG DECLARE_MESSAGE_MAP() protected: CMapStringToPtr m_mapIdToCar; CMapX* m_pMapX; CMapXLayer* m_pLayer; SCar* m_pPick; SCar* m_pLock; UINT m_nSensitivity; BOOL m_bDisplayState; public: CStringArray m_straCarType; BOOL Initialize( CMapX* pMapX, CMapXLayer* pLayer ); void AddFeature( SCar* pCar ); void AddCar( SCar* pCar ); BOOL LoadCars( CString strSelect ); void DeleteFeature( SCar* pCar ); void DeleteCar( SCar* pCar ); BOOL DeleteCars( CString strSelect ); void UpdateFeature( SCar* pCar ); void UpdateCarDB( SCar* pCar ); void UpdateGraph(); SCar* GetCar( double X, double Y ); void Bind(); void UnBind(); UINT GetCarColor( SCar* pCar ); void Pick( SCar* pCar ); UINT UpdateStatus( CString strMapID, const LPBYTE lpData, DWORD dwCount ); UINT UpdateStatus(); void Lock(); void Unlock(); BOOL MotionDetect(); void Flash(); };

2,142

社区成员

发帖
与我相关
我的任务
社区描述
它是一种特定的十分重要的空间信息系统。它是在计算机硬、软件系统支持下,对整个或部分地球表层(包括大气层)空间中的有关地理分布数据进行采集、储存、管理、运算、分析、显示和描述的技术系统。
社区管理员
  • 地理信息系统
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧