# OpenLayers Accessible Example

# Accessible Example

keyboard, pan, panning, zoom, zooming, accesskey
Go to map

Demonstrate the KeyboardDefaults control and how to use links with Access Keys to navigate the map with the keyboard.

zoom in zoom out

| pan north
pan west |  | pan east
| pan south |

Navigate the map in one of three ways:

1. Use Access Key "1" (alt + 1) to focus the map element, and use following keys to pan and zoom:
   - + (zoom in)
   - - (zoom out)
   - up-arrow (pan north)
   - down-arrow (pan south)
   - left-arrow (pan east)
   - right-arrow (pan west)
   See wikipedia for more detail about Access Keys.
2. Navigate to pan and zoom links using the "tab" key, and press "enter" to pan and zoom
3. If Access Keys work for links in your browser, use:
   - i (zoom in)
   - o (zoom out)
   - n (pan north)
   - s (pan south)
   - e (pan east)
   - w (pan west)

This is an example of using alternate methods to control panning and zooming. This approach uses map.pan() and map.zoom(). You'll note that to pan, additional math is necessary along with map.size() in order to set the distance to pan.