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

is Mappoint thread safe

This is a discussion on is Mappoint thread safe within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I'm using mappoint (the object model) for a very lengthy operation and like to do it in a background ...

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

    is Mappoint thread safe

    Hi,

    I'm using mappoint (the object model) for a very lengthy operation and like to do it in a background thread. The map is not visible as whell as no other part of the ojbect. Some has done this before or know some special behave I should be aware off ?

  2. #2
    Jeurink is offline Junior Member Yellow Belt
    Join Date
    Feb 2005
    Posts
    19
    I'm changing symbols, shapes etc. of the map from differend threads.
    I've not found unexpected behavior so far, but that is no guarantee offcourse.

    I think MapPoint works as follows:
    when you update a property (eg. the location property) an event is raised,
    and catched by the mappoint engine (that has its own thread) and reponds with an updated pushpin location.

    but as said, I'm not sure.

    succes with your application

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

    Thanks for reply. I will give feedback when I do the threaded thing (probably in a few day)

  4. #4
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    I think Jeurink is along the right lines. If you're telling MapPoint to do things from an external application, then your call will always be in a different thread. So it probably doesn't matter - as your own logic makes sense.
    Eg. using objects before they are created, or changing and querying them at the same time.

    I do have a couple of applications that use multi-threading, but all MapPoint code is one thread. The second thread looks after the GUI.

    Add-ins run "in-thread", so they're more likely to have problems. I guess you could try spawning a new thread in C++,Delphi,etc and see what happens, but I know VB won't let you do that.


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

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

    My plan is to create / destroy the obect and use it in same thread context to avoid any complications. I did not try it at the moment.

    Reason is that I have application receiving positions that possible are not on a digitized road. So I start running in circles until I can say: 'person is 35 meter SW of 'churchill road 322'.

    This take mutch time specially if the position is far away of a road. So that's the reason of thread question.

  6. #6
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    I guess that might be practical with the advent of multi-core (and hyperthreaded) cpus. Most of us are stuck on single cpu systems though


    If you've plenty of memory, you could always have two MapPoint instances.


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Co-op/Graduate Developer Position at Safe Software
    By Eric Frost in forum News and Announcements
    Replies: 0
    Last Post: 11-24-2005, 11:20 AM
  2. Load new map in separate thread to keep ui responsive?
    By TicK in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 11-11-2005, 01:07 PM
  3. Updating map in mapcontrol, through secondary thread
    By malkotian in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-16-2005, 03:44 PM
  4. Can't GetActiveMap from a Thread
    By discostu in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-08-2005, 08:25 AM
  5. Quick Review - Safe Software Feature Manipulation Engine for
    By Anonymous in forum MP2K Magazine Articles
    Replies: 0
    Last Post: 01-31-2002, 11:48 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 26 27 28 29 30 31 32 33 34 35 36