Community of VE/MapPoint Users and Developers
This is a discussion on MapPoint Gets closed on its own within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I am using MapPoint application object. When I try to use the application object with single its working fine. ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| MapPoint Gets closed on its own I am using MapPoint application object. When I try to use the application object with single its working fine. When I try to use the same with multiple users, it doesn't work proper. Actually it invokes 2 mappoint.exe on the system, but after sometime, mappoint.exe gets closed on it own. I am not able to understand what could be the reason. I am not sure, if MapPoint has got any timeout. Any info / pointer regarding this would be much appreciated. Thanks, Vijay |
| |||
|
Hi, Quote:
Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi Wilfried , Thanks for the reply. I am using MapPoint.Application to load MapPoint file programmatically. After loading am searching for some addresses given to me. Based on matched addresses am generating a report. I am able to search for nearly 400 addresses in a loop... When I use the same application with a single user it works fine. It takes nearly 1:30 secs to generate the report in csv format. But when I try to use the same with more than one user it works fine for 400 addresses search and generating the report. When I increase the number of addresses more than 400, then MapPoint does not seems to be working. For some time I can see the MapPoint instances in the memory, but after some time those instances will not be there. I am not able to understand why is this happening. Is there any MapPoint timeout?? Please do let me know how to solve this issue. Thanks Vijay
__________________ Thanks & Regards, Vijay |
| |||
|
Hi, Thanks, now I understeand Looks a strange problem. A workaround could be to spit your addresses into chuncks of 200..400 and operate the chuncks sequential. Maybe Mappoint has a problem because the calling application is not responding ? You can simple try this out by calling the message pump in your loop. Be aware that if you call windows message pump your code can get re-entered and you have to do it different in final release. Bur for test it is quick tested if that whas the proble.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Thanks for the information, I would like to tell you one more thing on this. The application is developed as web application. Does using MapPoint ActiveX control in web applications cause any problems?
__________________ Thanks & Regards, Vijay |
| |||
|
Hi, Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Code: Maybe Mappoint has a problem because the calling application is not responding ? You can simple try this out by calling the message pump in your loop. Am not too sure how to use the same in "message pump in your loop." By the way I would like to inform one morething i.e. I am using System.Runtime.InteropServices.Marshal.ReleaseComO bject to release the objects, Does this cause any problems?? Thanks, Vijay |
| |||
|
Hi, Quote:
Quote:
Code: Application.DoEvents(); Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Thank you very much. Before deciding on the message pump I would like to share the code what I had used in my application. I would request you to evaluate the same. Code: private int GetCounsellorCount(string street, string city, string state, string zip, string country, double radius)
{
// Find the Address Results into oResults Object
if(street.Length >=1)
{
if(street.Substring(0,1)=="#")
street=street.Replace("#","No ");
}
oResults=oMap.FindAddressResults(street,city,"" ,state, zip, country);
int counselCount=0;
if(oResults.ResultsQuality.ToString() == "geoFirstResultGood")
{
{
// Get the location object from Results
IEnumerator item = oResults.GetEnumerator();
while(item.MoveNext())
{
MapPoint.Location loc = (MapPoint.Location)item.Current ;
if(loc != null)
{
try
{
// Find the Pushpin with in the specified radius
oRs=oDss.QueryCircle(loc, radius);
if(oRs!=null)
{
oRs.MoveFirst();
while(!oRs.EOF )
{
oPin=oRs.Pushpin;
if(oPin !=null)
counselCount=counselCount+1;
oRs.MoveNext();
}
}
}
catch (Exception exe)
{
// Log Error
}
}
break;
}
}
}
else
counselCount=-1;
return counselCount;
}
__________________ Thanks & Regards, Vijay |
| |||
|
Hi, I think code is ok. If I find some sparetime this eve I will eventually try it out. However I'm not sure what to assign to oDss ? I also think you should replace this: Code: //MapPoint.Location loc = (MapPoint.Location)item.Current MapPoint.Location loc = item.Current as MapPoint.Location
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Determine if Map has been closed | BirdIslander | MapPoint 2006/2009 Discussion | 1 | 12-07-2005 01:33 PM |
| Determine if a polyline is closed? | Anonymous | MapPoint 2006/2009 Discussion | 4 | 03-29-2005 11:37 AM |
| If I draw a closed shape around some pushpins, and.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-09-2002 10:48 PM |
| Export to Excel works from 'closed shapes'. Is i.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-04-2002 09:54 AM |
Jersey Flights
Holiday Hypermarket should be your first choice for cheap flights. Book flights to exotic destinations or even just to Jersey.
Greece Weather
Check out Greece Weather - Travel Counsellors details information on Greece including, weather, flights and accommodation.
Cuba Holiday
A Cuba Holiday has so much to offer with numerous different cultures affecting the sights, sounds and tastes. Visit this fascinating country with dealchecker.co.uk.
Bahamas Holidays
Bahamas Holidays offer pure blue skies, soft white beaches and the holiday of a lifetime. Visit us for a great deal to the Bahamas.
Tunisia
Tunisia enjoys excellent weather, golden beaches and a beautiful blue sea. Moving away from the beach you will find a country that has a rich and varied past. Discover the secrets of history yourself by exploring all the ruins.
All inclusive holiday
Travel.co.uk is a travel comparison service which makes it easy to search and find your all inclusive holiday.
Holidays in Cyprus
Visit the tombs of the island kings! Visit On The Beach for information on holidays in Cyprus.