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
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

MapPoint Gets closed on its own

This is a discussion on MapPoint Gets closed on its own within the MapPoint Desktop 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. ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    MapPoint Gets closed on its own

    Hi,

    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

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

    When I try to use the same with multiple users, it doesn't work proper.
    Can you please tell me what exacly does not work ?

    Actually it invokes 2 mappoint.exe on the system, but after sometime, mappoint.exe gets closed on it own
    I just started several programs of me using mappoint. they all start an instance of mappoint in background. Nothing get closed. Can you please describe exacly the problem or did I istundersteasd ?

  3. #3
    gvkreddy is offline Junior Member White Belt
    Join Date
    Nov 2004
    Posts
    6
    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

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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.

  5. #5
    gvkreddy is offline Junior Member White Belt
    Join Date
    Nov 2004
    Posts
    6
    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

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

    Does using MapPoint ActiveX control in web applications cause any problems
    I'm not sure, but I dont think that can give any problems.

  7. #7
    gvkreddy is offline Junior Member White Belt
    Join Date
    Nov 2004
    Posts
    6
    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.
    Is there any timeout for MapPoint?

    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

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

    Is there any timeout for MapPoint?
    There is some 10 second timeout wich can cause the 'server busy' problem that some people have, but you talk about 1 minute and 30 seconds, so it should be something else

    Am not too sure how to use the same in "message pump in your loop."
    In .NET you enter the message pump by calling:
    Code:
    Application.DoEvents();
    System.Runtime.InteropServices.Marshal.ReleaseComO bject to release the objects, Does this cause any problems??
    I dont think so but I never used this.

  9. #9
    gvkreddy is offline Junior Member White Belt
    Join Date
    Nov 2004
    Posts
    6
    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;
            }
    The above is the function to which I make a call for every address that I would search
    Thanks & Regards,
    Vijay

  10. #10
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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
    if item.Current is _not_ a Location object then loc will be defenitively null which is (I think) not the case with the typecast and maybe can give unhandled exception then. However I dont think this has anything to do with the problem you see.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Determine if Map has been closed
    By BirdIslander in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-07-2005, 02:33 PM
  2. Determine if a polyline is closed?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 03-29-2005, 12:37 PM
  3. If I draw a closed shape around some pushpins, and....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-09-2002, 11:48 PM
  4. Export to Excel works from 'closed shapes'. Is i....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-04-2002, 10:54 AM

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