View Full Version : How to develop a MapPoint Appication

09-15-2005, 02:33 PM
I am a new developer in MapPoint and want to develop an application based on MapPoint with some of my UI. I have tried several ways, and have some problems:

(1) Add-In with VB6.0 – just follow the introduction in MapPoint help. I could add my menu item to MapPoint menu and popup a dialog. It seems workable. The problems are:
1. How could I access map object from my menu item handler?
2. I did not write VB code before. Is it possible for me to write Add-In with VC++?

(2) MFC exe with VC++ -- Using COleDocument/COleClientItem classes to load the MapPoint Control into the CView window. Basically, COleDocument has menu item Edit | Insert New Object… , so that we could load any registered controls. I just wrote some code to simplify this control selection process. I could add my menu item to MapPoint menu and I could do the operations MapPoint Provided. The problem is:
1. How could I access map object from my menu item handler?

(3) MFC exe with VC++ -- Create a CMappointCtrl in the CView object. I could show the Map. The advantage of this way is that I could access the MapPoint objects (such as map, location, pushpin) directly. The problems are:
1. How could I load the MapPoint original menu?
2. Where is the detailed documents for CMappointCtrl(such as the descritions for classes CMap1, CLocation, CFindResults )?
3. Could I build application in this way.

(4) Automate the MapPoint 2002 Control by Using Managed Visual C++ .NET – Just follow the instruction in web page http://support.microsoft.com/default.aspx?scid=kb;EN-US;302900
It works well. The problems
1. The program starting is too slow – it might take more than 30 seconds to show the map up.
2. It does not show the MapPoint original menu.

(5) I know I might be able to use a web service; I am still waiting my account approval. Is this a good way to write a MapPoint application?

I prefer (3) or (4) because I could access the control interface directly. But I am still facing lots of problems.

Thanks for any help.

09-17-2005, 07:35 AM

2. No problem to build application this way. You have some more typting to do because you cannot click on some component. I dont know for VC++, but building application like this in Delphi you dont have the mappoint label in the map. Accessing map object is the same as in 3 or 4 with a visual component.

3., 4. The original mappoint menu is not a public object, so you have to make your own menu and from your menu items you can access most (if not all) menu actions as in the original menu. Advantage is that you can add or remove things in your own menu.

About the slow start in 4, I dont know. What is the speed of the machine ? How many free RAM ? Note that in dotnet all take some more time as in regular win32 apps. I just tryed my testapp with mappoint on a 3 GHz machine and it is up and running in 13 seconds. Of course this is slow, I dont know wy it is sutch.

hope this answers some of your questions.