MapPoint Forums

MapForums

Community of MapPoint and Bing Maps 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 Desktop 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 Desktop Discussion > Development

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #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
Location: Belgium
Posts: 2,410
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
Black Belt
 
Join Date: Feb 2004
Posts: 1,464
Blog Entries: 40
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
See the Geoweb Guru for online mapping
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


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 07:10 AM
Using Mappoint in a class library shalu Bing Maps and MapPoint Web Service 0 01-31-2008 05:13 AM
Delphi class terrastudios MapPoint Desktop Discussion 9 12-02-2005 04:01 AM
generating with/implementing a map in MapPoint 2004 mohrm MapPoint Desktop Discussion 0 09-21-2004 03:56 AM
Background database interface with Mappoint Anonymous MapPoint Desktop Discussion 0 02-03-2004 03:16 PM


All times are GMT -5. The time now is 02:49 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.0 RC3
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70