Community of VE/MapPoint Users and Developers
This is a discussion on MapPoin VB.Net within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Dear All I have a problem with MapPoint in my vb.net application. I use MapPoint to show my vehicles on ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| MapPoin VB.Net I have a problem with MapPoint in my vb.net application. I use MapPoint to show my vehicles on map. My application is a MultiThread application and when I try to show a GPS Position on Map while MapPoint is busy to build the route I have a 'server busy' error. Are there any properties or events to know when the MapPoint Activex is in busy state? I try to use the "ReadyStateChange" event but it doesn't occur during route building and other functions. Thanks Matteo |
| |||
|
Hi, The 'server busy' shows up because your application does not resond to windows messages.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, The 'server busy' popup is in fact a very confusing message. It does not mean mappoint is busy, it means that mappoint is trying to process windows messages to your application and your application does not respond. But that's not all. I try to explain when it can show up: - Your application is not pumping messages on a (hidden) window. This can for example happen if it is looping somewhere during a long time. (I think >= 10 seconds). If that is the case then optimize the length operation or move it into a background thread. - Your application is pumping messages, but has a modal form in one of the Mappoint events. For example a popup menu. - If your application is multithreading and there is a hidden window created in one of the threads, be sure to have a working message pump in that thread. Note that this is not nececary if you have no window over there. There could be more reasons but this are the only one I am aware off. For example your application is multithreading. I think mappoint is thread safe, but I hope you dont access same mappoint instance from more than 1 thread, or does not call some methods from within a different thread context that the thread that created mappoint (normally UI thread).
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Thanks a lot for your reply. The problem is that I call some methods from different threads. I probably solved my problem using a VB.NET "Mutex" class to syncronize different threads. In your opinion, would it be a solution declare MapPoint variable as "Shared"? Thanks a lot again Matteo |
| |||
|
Hi Matteo, Declaring as shared is in my opinion not a solution. You indeed probably solved the problem with synchronizing your threads. But I also think it is only temporary solved. If you create a component in a particular thread context, normally you have to call all his events also from within same thread context. Synchronizing does not help, the context is what matters. Note that synchronizing threads is actually disable multithreading If you really need thread, then I advice if you wants to call mappoint methods then do it in main thread context. The most easy way to do it is to PostMessage to the main thread. Then the custom message handler do the call. in dotNet you can easy P/Invoke this win32API call. I think in version 2 they have done it theirselve but I still use my own.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| mappoin, vbnet |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there a patch or update to download for MapPoin.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-03-2002 08:36 AM |
| I am working on a large presentation using Mappoin.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 06-26-2002 09:22 AM |
| I've found many addresses that were not on MapPoin.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-05-2001 10:11 AM |
| Hello - I'm plotting point locations over MapPoin.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 10-11-2001 10:18 AM |
| Can 'customer symbols" be saved within the MapPoin.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 09-04-2001 08:27 AM |
Flights from East Midlands Airport
Book low cost airline flights from East Midlands Airport. Holiday Hypermarket let you search for great deals from top tour operators.
Greece Holidays
Find great Greece Holidays with Travel Counsellors. A personal Travel Counsellor can help you plan the perfect holiday to Greece.
Turkey Holidays
Istanbul is Turkey's prime attraction as it has the most beautiful mosques and palaces of the country; it has Byzantine churches and Roman temples. Book Turkey Holidays online.
Holidays to Bahamas
Choose from a number of extraordinary holidays to the Bahamas at The Holiday Place. See pictures of these beautiful islands online.
Spain
Spain is such a diverse country that it has something to offer most holidaymakers. Finding delicious cuisine is no challenge and the shopping ranges from designer boutiques to unknown flea markets. Spain has much to offer.
Bargain family holidays
We can help you find family holidays at bargain prices when you check out the options at Travel.co.uk
Cheap Goa Holidays
Experience the world famous Wednesday Flea Market at Anjuna! Book cheap Goa holidays at On The Beach!