FAQ

From MapElves

Jump to: navigation, search

Main page -> FAQ

Contents

General

Adding new streets

It is not possible to add new streets or do any modification to the maps. You have to wait for the next edition. Check also this thread describing how to use Autoroute data in MapPoint.

Drawing without the toolbar

Check this thread where Paul Larson presents a class on how to use the drawing functions without the MapPoint toolbar. It is done by finding the right window and sending a message to it.

Installing without CD

Check this thread where Eric Frost describes on how to install from the hard disk.

ObjectsFromPoint throws exception

The Map.ObjectsFromPoint method sometimes creates an invalid FindResults object. The count of the results is larger than the actual number of found items. You have to put it in an exception block.

Server busy pops up

This message box pops up if you are doing lengthy code in one of the events (longer than 10 seconds).

If the code cannot be optimized for speed, for example if the code executes a popup menu then the way to go is to place the code outside the event handler. Best way to do is to post a message to a custom message handler. This custom message handler will then execute as soon as windows starts pumping messages again (this will be as soon as your event handler ends).

Note that you can do the same if using a timer with an interval of 1 millisecond, but this is not considered as a good programming technique.

NT Service problems

If you have UnauthorizedAccessException or ComException errors when running MapPoint in an NT service it could be that the EULA has popped up in the middle of nowhere. So stop the service, set it to interact with the desktop and start it again. When the EULA pops up then click 'I agree'. Then you can uncheck the interaction with the desktop again.

Trial version

You can find download link for trial version here. Only north America version is available, but that should be not a problem to find out the possibilities of the product.

Developing

Destroy all instances of MapPoint

While developing, program termination is not always graceful and sometimes you have a lot of mappoint.exe instances in memory. To destroy them all, you can create following console program witch terminates all mappoint.exe instances currently running.

using System.Diagnostics;

namespace KillAllMappoints
{
   class Program
   {
      static void Main(string[] args)
      {
         Process[] processes = Process.GetProcessesByName("MapPoint");
         foreach (Process proc in processes)
            proc.Kill();
      }
   }
}
Personal tools