Teocali
Teocali

Reputation: 2704

How to use the MapPoint Control and the Mappoint Application in the same application

I'm currently working on an application using the MapPoint Object Library. One of the first line of code is

MapPoint.Application mapPointApplication = new MapPoint.Application();

which launch the Mappoint application, at which point I can interact with it (getting the map, adding pushpin and pushpinset and so on... oh happiness).

The problem occur later, when I want the user to make the choice between two possible pushpin. For facilitate this choice, I would use a popup dialog with the two pushpin put on a clean Map, using the mappoint control. So I'm trying to reference this control and use it on my form, removing the reference to the Mappoint Object Library as asked by VS, saying that the control library already reference the object library... seems legit

But, alas ! Once the reference change are undergone, I got a build error at my the very first line of code, the one showed at the start of this message.

Cannot create an instance of the abstract class or interface 'MapPoint.Application'

So here my question : are the instantiation of the Mappoint application and of the Mappoint are incompatibles in a same executable ?

In advance, thanks for any insights

Upvotes: 1

Views: 918

Answers (1)

Eric
Eric

Reputation: 26

That's a good questions. I've only ever used the control or the application in a single project, never both.

Do you have a good reason for using both? Why don't you just use the control?

Also, I think you're going to find the most knowledgeable MapPoint developers at http://www.MapForums.com, I'd recommend to post there as well.

Eric

Upvotes: 1

Related Questions