MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




MapPoint 2010 GPS API

This is a discussion on MapPoint 2010 GPS API within the MapPoint Desktop Discussion forums, part of the Map Forums category; Apparently mappoint 2010 has new API features to toggle GPS tracking and navigation. Has anyone gotten these to work? I ...


Go Back   MapPoint Forums > Map Forums > MapPoint Desktop Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-04-2010
Junior Member
Yellow Belt
 
Join Date: Mar 2010
Posts: 14
MapPoint 2010 GPS API

Apparently mappoint 2010 has new API features to toggle GPS tracking and navigation. Has anyone gotten these to work?
I try doing this:

map.GPSNavigation.Tracking = true;

And I get unauthorized access errors....

Any ideas guys?
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 03-04-2010
Junior Member
Yellow Belt
 
Join Date: Mar 2010
Posts: 14
Re: MapPoint 2010 GPS API

Ive managed to get it to open the GPSpane, where I can manually click start tracking.

map.Application.PaneState = GeoPaneState.geoPaneGPS;

Unfortunately I still can not get it to activate through code.

Also, how do I get the current lat and long coordinates?

Come on Microsoft, why is there so little support in such essential API features?
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 03-05-2010
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 3,587
Blog Entries: 3
Re: MapPoint 2010 GPS API

It's a bit of a hack, but Paul Larson wrote an article and posted some sample code a while back --

An API to Control MapPoint 2006 GPS Features - Part I of II - MapPoint Articles - MP2K Magazine

Maybe that can help?

Eric
__________________
~ Now taking orders for MapPoint 2010 ~
~~
~ Upgrade to MapForums Plus membership ~
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 03-05-2010
Junior Member
Yellow Belt
 
Join Date: Mar 2010
Posts: 14
Re: MapPoint 2010 GPS API

Thanks for the reply,

Ive taken a look at that and unfortunately it's written in VB which I have no experience in (I'm using c#). I though the 2010 API was supposed to have support for this...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 04-02-2010
Junior Member
White Belt
 
Join Date: Apr 2010
Posts: 2
Re: MapPoint 2010 GPS API

Hy!

I have the same problem here.
Code:
map.ActiveMap.GPSNavigation.Navigation = True
It doesn't work!

Showing the GPS pane crashes, so does GeoPaneState.geoPaneMapSettings
I've got a "The parameter is incorrect".

Is there something to do before using GPS navigation and tracking?
I didn't see anything in MapPoint's Help (there is a programming section).
And nothing on TechNet neither...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 04-02-2010
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,463
Blog Entries: 40
Re: MapPoint 2010 GPS API

Works for me and I'm even indoors!

Going by your error it sounds like you are referencing an older API. Make sure you set your COM interface to point to MapPoint 2010. For my quick little test sample I used MapPoint Europe 2010, but that was because the North American edition's COM server wasn't properly registered on my dev PC.

Also note that the GPSNavigation object will throw a COM Exception if you try to do things with it (eg. switch tracking on) if you do not have a GPS device installed and configured (and recognised by MapPoint). Configure it manually with MapPoint first to make sure it is working. The exception's text makes it clear that MapPoint does not think there's a device attached.

Here's the code (built as a command line C# program and run in debug mode, but this doesn't matter):

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;

using System.Runtime.InteropServices;


namespace MapPointGPSTest
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Starting...");

            MapPoint.Application myApp = new MapPoint.Application();
            myApp.Visible = true;

            MapPoint.Map myMap = myApp.ActiveMap;

            MapPoint.GPSNavigation nav = myMap.GPSNavigation;

            Console.WriteLine("Got the nav object");

            nav.Tracking = true;


            Console.WriteLine("Press return to exit");
            Console.ReadLine();
        }
    }
}

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
  #7 (permalink)  
Old 04-02-2010
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,463
Blog Entries: 40
Re: MapPoint 2010 GPS API

And for the record, nav.Navigation=true also works but didn't do anything as I didn't have a route defined.

Other gotchas in the documentation: The GPSNavigation object is disabled when the map is embedded in an OLE control (eg. inside MS Word or Access).


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

Last edited by Winwaed; 04-02-2010 at 09:17 PM.. Reason: improved the English
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 04-06-2010
Junior Member
White Belt
 
Join Date: Apr 2010
Posts: 2
Re: MapPoint 2010 GPS API

Hi!

I got the GPSPane to work. But enabling Tracking and Navigation using code doesn't work.
What do you mean by OLE stuffs? If I'm developing a Windows Form application, using the MapPoint OCX, will it work? Or not...

Sorry but I'm not a pro developer... I prefer Network/System managing ^^

Btw... I'm using MapPoint North America 2010, but I'm in Europe. I get a valid position, even on the map. But I can't create any route because the soft doesn't know European roads.
I wanted to install MapPoint Europe 2010 too but only the 2009 version is available on my MSDNAA account!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 04-06-2010
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,463
Blog Entries: 40
Re: MapPoint 2010 GPS API

An OCX control might be restricted - I rarely use the MapPoint control, but some features are restricted (typically for practical or copyright/branding reasons).

I know my installation of MapPoint Europe 2010 came from MSDN so you might want to check again or to check your subscription level.


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
  #10 (permalink)  
Old 04-14-2010
Junior Member
Yellow Belt
 
Join Date: Mar 2010
Posts: 14
Re: MapPoint 2010 GPS API

Hi Richard,

Can you attempt this with the ocx control? If it is indeed restricted, how can I get this feature working embedded into my application? I have not tried out your code, but from the looks of it, it opens an instance of that mappoint application (similar to running the exe manually), and turns on the gps tracking, am I correct in assuming this?

If this is the case, and there is no work around for the ocx control, do you think it would suffice to create a transparent panel with the mappoint application behind it? Simulating the appearance of a control.

Let me know what you think, thank you.

Matt
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
2010, api, gps, mappoint


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
MapPoint 2010 Information Eric Frost MapPoint Desktop Discussion 37 06-04-2010 10:11 AM
MapPoint 2010 Europe LochyHood MP2K Magazine Articles 4 02-05-2010 02:53 AM
Mappoint 2010 lacja Development 6 12-22-2009 12:16 PM
Mappoint 2010 / Streets and Trips 2010 dpendell MapPoint Desktop Discussion 2 11-23-2009 12:34 PM
MapPoint 2010 Pushpins xjack Development 0 10-04-2009 07:16 AM


All times are GMT -5. The time now is 10:27 PM.


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