MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MapPoint 2006 C# - No class implementing 'Application'-interface?

This is a discussion on MapPoint 2006 C# - No class implementing 'Application'-interface? within the Development forums, part of the MapPoint 2006/2009 Discussion category; Hi, In MapPoint 2004, there is a class named ApplicationClass that implements the Application interface so that one can access ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion > Development

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-10-2008
Junior Member
White Belt
 
Join Date: Jul 2008
Posts: 2
MapPoint 2006 C# - No class implementing 'Application'-interface?

Hi,

In MapPoint 2004, there is a class named ApplicationClass that implements the Application interface so that one can access MapPoint without dropping in the OCX-component (ActiveX Control):

Code:
using MapPoint;
...
ApplicationClass _app = new ApplicationClass();
Map _map = _app.ActiveMap;
...
In MapPoint 2006, I cannot find any class that implements the Application interface. How do I connect to the Application object or somehow access the maps within MapPoint 2006 (without dropping in the OCX-component)?

Thanks in advance,

/John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 07-10-2008
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: MapPoint 2006 C# - No class implementing 'Application'-interface?

Hi,

I have this code snipped wording with mp2006:
Code:
private void button1_Click(object sender, System.EventArgs e)
{
    try {
        app = new ApplicationClass();
        app.Visible = true;
        // etc...
I have Mappoint added to the references of the project. It refers to the type library (*.tlb) placed in the mappoint installation directory. Also it is in the using clase.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 07-10-2008
Junior Member
White Belt
 
Join Date: Jul 2008
Posts: 2
Re: MapPoint 2006 C# - No class implementing 'Application'-interface?

Hi,

Thanks for you reply!

I was refering to the .ocx-component, my bad. Works fine now, however I cannot load the US maps (got them installed).
If I drop in the Active X Controll I can select US maps and it loads fine:

Code:
axControl.NewMap(GeoMapRegion.geoMapNorthAmerica); 
but this?:

Code:
ApplicationClass _app = new ApplicationClass();
Map _map = _app.NewMap( ? ); // takes string
...
What should the 'string Template' look like? or is this feature unavailable when using the Object Model?

/John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 07-10-2008
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 899
Blog Entries: 10
Re: MapPoint 2006 C# - No class implementing 'Application'-interface?

The string is a path name to a MapPoint template file.

You can use OpenMap if you want to open a map file (instead of creating a new one based on a template). This has two parameters - you probably need to use the second one (boolean, add file to "recent file" list?) because COM doesn't always support optional parameters properly.



Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
applicationinterface, class, implementing, mappoint 2006


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/mappoint-2006-c-no-class-implementing-application-interface-8021.html

Posted By For Type Date
Programming MapPoint in .NET - MP2K Magazine This thread Refback 07-11-2008 10:22 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Deploying a VB.Net 2005 Application w/ MapPoint 2006 control13 Development 1 03-31-2008 08:10 AM
Using Mappoint in a class library shalu MapPoint Web Service and Virtual Earth 0 01-31-2008 06:13 AM
Delphi class terrastudios MapPoint 2006/2009 Discussion 9 12-02-2005 05:01 AM
generating with/implementing a map in MapPoint 2004 mohrm MapPoint 2006/2009 Discussion 0 09-21-2004 04:56 AM
Background database interface with Mappoint Anonymous MapPoint 2006/2009 Discussion 0 02-03-2004 04:16 PM


All times are GMT -5. The time now is 05:00 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54