GeoMedia Discussions

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 80
Registered: ‎05-30-2016
Accepted Solution

How to interupt pan mode when using EventControl to capture range

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?

Regular Contributor
Posts: 215
Registered: ‎05-25-2016

Re: How to interupt pan mode when using EventControl to capture range

Hi Xguy

 

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.

 

Best regards,

hesrah

 

 

Contributor
Posts: 80
Registered: ‎05-30-2016

Re: How to interupt pan mode when using EventControl to capture range

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. 

Regular Contributor
Posts: 215
Registered: ‎05-25-2016

Re: How to interupt pan mode when using EventControl to capture range

[ Edited ]

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 Smiley Happy