02-04-2017 05:20 PM
I am using the EventControl to support a custom command that enables the end-user to capture a range from a map view. It works fine, except when the map window has some other command enabled such as panning. When the map window is in panning mode, and I run my command it draws my rectangle, but also pans the map.
I've looked extensively in the docs and support site at examples, but none that I've found show how to 'interupt' the panning mode.
Anybody know the trick?
Solved! Go to Solution.
02-05-2017 03:56 AM
GeoMedia commands have a command type. This type implicates something like a hierarchy between the commands. For example if you start a zoom command while you digitize, the digitize command stops temporary. Then, if you press the ESC key the zoom command stops and you "drop back" to the digitize command. So the zoom command couldn't end the digitize command, it only suspends the digitize command temporary. The digitize command is "stronger" than zoom commands,
Another example: If a zoom command is active and you start another zoom command, the first zoom command ends definitely. So the two zoom commands are equally "strong".
For details see the documentation.
Now, your user command has such a type too. Your user command lines up in this command hierarchy of GeoMedia. The type of your user command is defined in the command configuration file (xml or ini). The command wizard creates this file for you. You only need to choose the correct type (view listener command type) in the wizard dialog (for details see the seperate documentation of the command wizard).
If you know your command type, you can edit the command configuration file manually - if you know what you do! Attention, on the base of this type information the GeoMedia command server calls the methods of your command. So the command code must correspond to the command type.
If your digitize command has the correct type information, it stops (or suspends) other commands like panning.
02-06-2017 08:57 AM
Thanks for the reply. It wasn't clear to me based soley on the EventControl docs that the command listener was involved. I thought it might be so I added some listener logic, but failed to change the command listener type. I have it partly working now. I just need to figure out the right kind of listener, and do some refactoring. The command is actually a TrackerCommand I created a few years. It runs a full blown app that interacts with GeoMedia, but up till now, no event interaction.
02-06-2017 03:44 PM - edited 02-06-2017 03:45 PM
A Tracker command doesn't suspend another command and will not be suspended by another command - that's exactly what happens in the conflict with the panning.
I guess you need a Placement (maybe an Edit) command.
Good luck with your listener