Pan map using arrow keys


Purpose
This sample demonstrates how the MapBean can be configured to pan the display using the arrow keys on the keyboard, and to zoom in and out of the display using the mouse wheel when the MapBean has focus.

How to use

See How to use ArcGIS samples for help on running the sample.

  1. Most container dialogs use the arrow keys to change control focus and do not pass these key values on to the MapBean. Use the setKeyIntercept method to allow these keys to be intercepted before the container dialog processes them.
  2. Use the setAutoKeyboardScrolling method to enable automatic panning of the display when the arrow keys are intercepted and the setAutoMouseWheel property to enable automatic zooming on the display with the mouse wheel.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

mapbean/PanMapUsingArrowKeys.java Main class.




Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced