Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 6 of 6

Programatically plot a route based on GPS position

This is a discussion on Programatically plot a route based on GPS position within the MapPoint Desktop Discussion forums, part of the Map Forums category; Using the mappoint OCX want to route based on current GPS position and a given address. In fact, if I ...

  1. #1
    chance1166 is offline Junior Member White Belt
    Join Date
    Dec 2005
    Posts
    9

    Programatically plot a route based on GPS position

    Using the mappoint OCX want to route based on current GPS position and a given address. In fact, if I could show the current position based on GPS coordinates on the map that would be swell too. I am using the OCX so this must be done programatically. Any suggestions?

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    You receive position then place a pushpin on the map like following example:

    Code:
                Location loc = mp.ActiveMap.GetLocation(lat, lon, 1);
                Pushpin pp  = mp.ActiveMap.AddPushpin(loc, vehicleName);
                pp.Symbol = 1;
    Eventually you add note:

    Code:
                pp.Note = vehicleName + otherInfo;
    Eventually you change ballonstate:

    Code:
                PP.BalloonState = GeoBalloonState.geoDisplayName;
                pp.BalloonState = GeoBalloonState.geoDisplayBalloon;
                pp.Highlight = true;
    Eventually you zoom to vehicle with one of following:

    Code:
                PP.GoTo();
                mp.ActiveMap.GoToLatLong(lat, lon, alt);

  3. #3
    chance1166 is offline Junior Member White Belt
    Join Date
    Dec 2005
    Posts
    9
    The question is, how do I receive position?

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    This is fast reply

    I dont really understeand. You can programmaticly put positions on map. You receive postion can in various ways, but this is enterly depending on your application.

    For example if you want to have a dispatch centre with whole fleet, then you must write a server getting all positions of the fleet. This can be done with GSM's or with boardcomputers, etc. There are GSM that can send a GPS position.

    Some GSM providers (not all) also have a service to give the position of it. That's what mappoint location server make use off. But not all GSM providers have that service.

    Please tell me some more of your application so that we able to help more.

  5. #5
    chance1166 is offline Junior Member White Belt
    Join Date
    Dec 2005
    Posts
    9
    Okay sorry what I am wondernig is how am I going to get the current lattitude and longitude out of my GPS receiver. BTW, I am using the Pharos BT GPS Rx.

    My application is very simple, I only want to be able to plot a route based on one's current GPS position to a given address.

    Does that make sense?

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    I cannot give code example because I do not have PC based application to get positions out of GPS receiver.

    But it is very simple. Program your GPS receiver to give GGA or RMC strings, just parse it and give the coordinates to mappoint.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MapPoint to Gif Programatically
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 03-17-2004, 09:32 AM
  2. Programatically adding push pins on a route
    By Fabian in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 07-17-2003, 04:52 PM
  3. With MP2K does anyone know how to programatically ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-29-2002, 07:19 AM
  4. Is there a way to programatically switch the mouse....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 07-19-2002, 10:14 AM
  5. How does one programatically in VB present anoutli....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-07-2001, 02:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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