OpenLayers Accessible Example

# Accessible Example

Demonstrate how to use the KeyboardDefaults option parameter for layer types.

zoom out | pan north | zoom in
pan west |  | pan east
| pan south |

Navigate the map in one of three ways:

- Click on the named links to zoom and pan
- 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)
- 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.