Developers Knowledge Base

GeoMedia, a comprehensive and dynamic GIS, extracts compelling intelligence from geospatial data and integrates it to present actionable information.
Showing results for 
Search instead for 
Do you mean 

Modeless tracker command works incorrectly if GeoMedia command is invoked.

by Anonymous on ‎02-23-2016 08:13 AM - edited on ‎04-06-2016 09:27 AM by Moderator (352 Views)


This user has a modeless, tracker command which uses the SmartLocateService. The command gets out of sync if a GeoMedia command is invoked then dismissed (using the escape key). The command has two modes:

  • HOVER - Hover mode recognizes features if the mouse moves over them.
  • SELECT - Select mode recognizes features if the user selects them.

The command processes a mouse move event in hover mode and a mouse up event in select mode. Both of these modes work fine until the user executes another GeoMedia command (such as a view manipulation command). At this point, hover mode still works, but select mode is behind one feature. After a GM command is used, the first selected feature is not recognized, but the second selected feature causes the first selected feature to be recognized. Executing subsequent GM commands leave the user behind one feature.


In the above case, the MouseUp event is listened to by multiple commands; at least 2 of which are GeMedia's Locate and the custom command. The custom command needs to know about the selected object after it is located, but the operating system is in charge of the order in which multiple listeners receive events. Unfortunately, the order in which the commands receive this event changes as other listening commands are run. Therefore, the recommendation is for the user to listen to the events on the DocumentSelectedObjects if they are interested in processing data after it is added to the LocatedObjectsCollection.  GeoMedia typically listens to events on the document select set rather than listening to MapView events in cases such as this.