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 |
Cheap Flights to Brussels
Book cheap flights to Brussels online today. Brussels is a city with diverse culture with over 100 museums to visit and an array of different architectural designs to view.
Spain Weather
Check Spain Weather before you travel. We provide information on Spain including weather, flights and accommodation.
Cheap Holiday Turkey
Booking a cheap holiday to Turkey doesn't have to be at the expense of enjoyment. Dealchecker.co.uk searches holidays from the leading UK Tour Operators.
Egypt Holidays
Visit one of the most spectacular sightseeing destinations in the world with The Holiday Place. Egypt holidays provide a fantastic break!
Cheap Turkey Holidays
The best time of year to sneak in cheap Turkey holidays is during the off-peak season. Check out the great deals available during April, May or October. For other tips on how to bag a great value holiday simply check online at ulookubook.com
Cheap Travel
Travel.co.uk has some excellent offers on cheap travel. Click here.
Cheap Holidays to Goa
Dine on delightful seafood in west India. Find information on cheap holidays in Goa at On The Beach.