Error: Method 'Track~' of object '_DMap' failed.

Error Message

This error occurs when the mouse is moved across a MapObjects map control:

Method 'Track~' of object '_DMap' failed.


The map control has been coded with MouseMove event using the Refresh method, and the MouseDown event contains one of the four 'Track~' methods (TrackRectangle, TrackLine, etc.).

Solution or Workaround

Change your application design so you have only one of the following:

  • One of the various Refresh methods of the map control or TrackingLayer called from the map control's MouseMove event.
  • One of the various 'Track~' methods of the map control in the map control's MouseDown event.

    Consider using the DrawShape method in one of the ~LayerDraw events to draw the tracked features instead of the TrackingLayer.