Drawing layers on CView's (OnDraw) Drawing area.
mg.srikanth
Global Mapper User
Hi everybody,
I am trying to use global mapper SDK in VC++ MFC project. My requirement is to draw the geographic layers on the Drawing area of my view area which is derived from CView base class. I was able to draw line, circle, rectangle etc. using CPen in ::OnDraw function of my class but, I am not able to draw the Geographic (vector) layers on it. Is there any procedure to follow to draw the map data on the drawing area? how do i proceed using global mapper sdk? I have downloaded the sample source code i.e. GMDLL_Tester in VC++ which is able to draw geographic layers on a picture control. But i could not make use of it for my requirement. Can anybody help me out the procedure to draw the geographic data on my drawing area of MFC project?
I will waiting for a positive reply....
I am trying to use global mapper SDK in VC++ MFC project. My requirement is to draw the geographic layers on the Drawing area of my view area which is derived from CView base class. I was able to draw line, circle, rectangle etc. using CPen in ::OnDraw function of my class but, I am not able to draw the Geographic (vector) layers on it. Is there any procedure to follow to draw the map data on the drawing area? how do i proceed using global mapper sdk? I have downloaded the sample source code i.e. GMDLL_Tester in VC++ which is able to draw geographic layers on a picture control. But i could not make use of it for my requirement. Can anybody help me out the procedure to draw the geographic data on my drawing area of MFC project?
I will waiting for a positive reply....
Comments
-
You would just call GM_DrawLayerList with the DC (or a background DC that you later BitBlt to that DC) for the OnDraw function. I would in fact suggest using the GM_MapWindow C++ class from the C++ sample application in its entirety and just pass in the window handle for your CView-derived class and the client rectangle as the bounds, then use your OnDraw DC just like the CDialog-wrapper class in the C++ sample application does from its OnPaint. Basically exactly the same thing, just from CView OnDraw rather than CDialog::OnPaint, but no conceptual difference. The picture control in the C++ sample application is just to allow easy definition of the bounds of the draw window, the picture control isn't needed at all.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.globalmapper.com
Categories
- 13K All Categories
- 5.8K Features Discussion
- 349 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 835 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 181 Announcement and News
- 939 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 579 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 110 Global Mapper Forum Website
